From 69d80d20432d0c8311cc410d2dfe1f78f18baf23 Mon Sep 17 00:00:00 2001 From: avkr003 Date: Mon, 21 Jul 2025 18:15:16 +0530 Subject: [PATCH 1/4] pereptual adl --- api/elys/perpetual/genesis.pulsar.go | 188 +- api/elys/perpetual/params.pulsar.go | 2533 ++--------------- api/elys/perpetual/pool.pulsar.go | 124 +- api/elys/perpetual/query.pulsar.go | 1496 +++++----- api/elys/perpetual/tx.pulsar.go | 542 ++-- api/elys/perpetual/types.pulsar.go | 624 +++- go.mod | 1 - go.sum | 4 - proto/elys/perpetual/genesis.proto | 1 + proto/elys/perpetual/params.proto | 103 +- proto/elys/perpetual/pool.proto | 5 + proto/elys/perpetual/query.proto | 13 +- proto/elys/perpetual/tx.proto | 5 + proto/elys/perpetual/types.proto | 6 + x/accountedpool/types/query.pb.go | 1 - x/accountedpool/types/tx.pb.go | 1 - x/amm/types/query.pb.go | 1 - x/amm/types/tx.pb.go | 1 - x/assetprofile/types/query.pb.go | 1 - x/assetprofile/types/tx.pb.go | 1 - x/burner/types/query.pb.go | 1 - x/burner/types/tx.pb.go | 1 - x/commitment/types/query.pb.go | 1 - x/commitment/types/tx.pb.go | 1 - x/epochs/types/query.pb.go | 1 - x/estaking/types/query.pb.go | 1 - x/estaking/types/tx.pb.go | 1 - x/leveragelp/types/query.pb.go | 1 - x/leveragelp/types/tx.pb.go | 1 - x/masterchef/types/query.pb.go | 1 - x/masterchef/types/tx.pb.go | 1 - x/oracle/types/query.pb.go | 3 +- x/oracle/types/tx.pb.go | 3 +- x/parameter/types/query.pb.go | 1 - x/parameter/types/tx.pb.go | 1 - x/perpetual/keeper/adl.go | 113 + x/perpetual/keeper/close_position.go | 12 +- x/perpetual/keeper/mtp.go | 108 +- .../keeper/query_get_positions_for_address.go | 4 +- x/perpetual/keeper/reset_store.go | 43 - x/perpetual/keeper/reset_store_test.go | 5 - x/perpetual/migrations/v13_migration.go | 2 +- x/perpetual/migrations/v19_migration.go | 124 - x/perpetual/migrations/v21_migration.go | 17 + x/perpetual/module.go | 4 +- x/perpetual/types/genesis.pb.go | 108 +- x/perpetual/types/keys.go | 31 +- x/perpetual/types/message_close.go | 24 +- x/perpetual/types/message_close_test.go | 42 +- x/perpetual/types/params.pb.go | 1906 +++---------- x/perpetual/types/pool.pb.go | 153 +- x/perpetual/types/query.pb.go | 446 ++- x/perpetual/types/query.pb.gw.go | 42 +- x/perpetual/types/tx.pb.go | 219 +- x/perpetual/types/types.pb.go | 370 ++- x/stablestake/types/query.pb.go | 1 - x/stablestake/types/tx.pb.go | 1 - x/tier/keeper/portfolio.go | 2 +- x/tier/types/expected_keepers.go | 3 +- x/tier/types/query.pb.go | 1 - x/tier/types/tx.pb.go | 1 - x/tokenomics/types/query.pb.go | 1 - x/tokenomics/types/tx.pb.go | 1 - x/tradeshield/types/expected_keepers.go | 3 +- x/tradeshield/types/mocks/perpetual_keeper.go | 130 +- x/tradeshield/types/query.pb.go | 1 - x/tradeshield/types/tx.pb.go | 1 - 67 files changed, 3564 insertions(+), 6025 deletions(-) create mode 100644 x/perpetual/keeper/adl.go delete mode 100644 x/perpetual/keeper/reset_store.go delete mode 100644 x/perpetual/keeper/reset_store_test.go create mode 100644 x/perpetual/migrations/v21_migration.go diff --git a/api/elys/perpetual/genesis.pulsar.go b/api/elys/perpetual/genesis.pulsar.go index f3ee902d2..6057af899 100644 --- a/api/elys/perpetual/genesis.pulsar.go +++ b/api/elys/perpetual/genesis.pulsar.go @@ -212,6 +212,57 @@ func (x *_GenesisState_5_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_GenesisState_6_list)(nil) + +type _GenesisState_6_list struct { + list *[]*ADLCounter +} + +func (x *_GenesisState_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ADLCounter) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ADLCounter) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { + v := new(ADLCounter) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_6_list) NewElement() protoreflect.Value { + v := new(ADLCounter) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) IsValid() bool { + return x.list != nil +} + var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor @@ -219,6 +270,7 @@ var ( fd_GenesisState_mtp_list protoreflect.FieldDescriptor fd_GenesisState_address_whitelist protoreflect.FieldDescriptor fd_GenesisState_perpetual_counter protoreflect.FieldDescriptor + fd_GenesisState_adl_counter protoreflect.FieldDescriptor ) func init() { @@ -229,6 +281,7 @@ func init() { fd_GenesisState_mtp_list = md_GenesisState.Fields().ByName("mtp_list") fd_GenesisState_address_whitelist = md_GenesisState.Fields().ByName("address_whitelist") fd_GenesisState_perpetual_counter = md_GenesisState.Fields().ByName("perpetual_counter") + fd_GenesisState_adl_counter = md_GenesisState.Fields().ByName("adl_counter") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -326,6 +379,12 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if len(x.AdlCounter) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.AdlCounter}) + if !f(fd_GenesisState_adl_counter, value) { + return + } + } } // Has reports whether a field is populated. @@ -351,6 +410,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return len(x.AddressWhitelist) != 0 case "elys.perpetual.GenesisState.perpetual_counter": return len(x.PerpetualCounter) != 0 + case "elys.perpetual.GenesisState.adl_counter": + return len(x.AdlCounter) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.GenesisState")) @@ -377,6 +438,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.AddressWhitelist = nil case "elys.perpetual.GenesisState.perpetual_counter": x.PerpetualCounter = nil + case "elys.perpetual.GenesisState.adl_counter": + x.AdlCounter = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.GenesisState")) @@ -420,6 +483,12 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_5_list{list: &x.PerpetualCounter} return protoreflect.ValueOfList(listValue) + case "elys.perpetual.GenesisState.adl_counter": + if len(x.AdlCounter) == 0 { + return protoreflect.ValueOfList(&_GenesisState_6_list{}) + } + listValue := &_GenesisState_6_list{list: &x.AdlCounter} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.GenesisState")) @@ -458,6 +527,10 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_5_list) x.PerpetualCounter = *clv.list + case "elys.perpetual.GenesisState.adl_counter": + lv := value.List() + clv := lv.(*_GenesisState_6_list) + x.AdlCounter = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.GenesisState")) @@ -507,6 +580,12 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_5_list{list: &x.PerpetualCounter} return protoreflect.ValueOfList(value) + case "elys.perpetual.GenesisState.adl_counter": + if x.AdlCounter == nil { + x.AdlCounter = []*ADLCounter{} + } + value := &_GenesisState_6_list{list: &x.AdlCounter} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.GenesisState")) @@ -535,6 +614,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "elys.perpetual.GenesisState.perpetual_counter": list := []*PerpetualCounter{} return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) + case "elys.perpetual.GenesisState.adl_counter": + list := []*ADLCounter{} + return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.GenesisState")) @@ -632,6 +714,12 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if len(x.AdlCounter) > 0 { + for _, e := range x.AdlCounter { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -661,6 +749,22 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.AdlCounter) > 0 { + for iNdEx := len(x.AdlCounter) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AdlCounter[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] = 0x32 + } + } if len(x.PerpetualCounter) > 0 { for iNdEx := len(x.PerpetualCounter) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.PerpetualCounter[iNdEx]) @@ -951,6 +1055,40 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AdlCounter", 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 + } + x.AdlCounter = append(x.AdlCounter, &ADLCounter{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AdlCounter[len(x.AdlCounter)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1010,6 +1148,7 @@ type GenesisState struct { MtpList []*MTP `protobuf:"bytes,3,rep,name=mtp_list,json=mtpList,proto3" json:"mtp_list,omitempty"` AddressWhitelist []string `protobuf:"bytes,4,rep,name=address_whitelist,json=addressWhitelist,proto3" json:"address_whitelist,omitempty"` PerpetualCounter []*PerpetualCounter `protobuf:"bytes,5,rep,name=perpetual_counter,json=perpetualCounter,proto3" json:"perpetual_counter,omitempty"` + AdlCounter []*ADLCounter `protobuf:"bytes,6,rep,name=adl_counter,json=adlCounter,proto3" json:"adl_counter,omitempty"` } func (x *GenesisState) Reset() { @@ -1067,6 +1206,13 @@ func (x *GenesisState) GetPerpetualCounter() []*PerpetualCounter { return nil } +func (x *GenesisState) GetAdlCounter() []*ADLCounter { + if x != nil { + return x.AdlCounter + } + return nil +} + var File_elys_perpetual_genesis_proto protoreflect.FileDescriptor var file_elys_perpetual_genesis_proto_rawDesc = []byte{ @@ -1079,7 +1225,7 @@ var file_elys_perpetual_genesis_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x19, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, @@ -1099,18 +1245,22 @@ var file_elys_perpetual_genesis_proto_rawDesc = []byte{ 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x42, 0xaf, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, - 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, - 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x41, 0x0a, 0x0b, 0x61, 0x64, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x41, 0x44, 0x4c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x61, 0x64, 0x6c, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x65, 0x72, 0x42, 0xaf, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, + 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xa2, 0x02, + 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1132,17 +1282,19 @@ var file_elys_perpetual_genesis_proto_goTypes = []interface{}{ (*Pool)(nil), // 2: elys.perpetual.Pool (*MTP)(nil), // 3: elys.perpetual.MTP (*PerpetualCounter)(nil), // 4: elys.perpetual.PerpetualCounter + (*ADLCounter)(nil), // 5: elys.perpetual.ADLCounter } var file_elys_perpetual_genesis_proto_depIdxs = []int32{ 1, // 0: elys.perpetual.GenesisState.params:type_name -> elys.perpetual.Params 2, // 1: elys.perpetual.GenesisState.pool_list:type_name -> elys.perpetual.Pool 3, // 2: elys.perpetual.GenesisState.mtp_list:type_name -> elys.perpetual.MTP 4, // 3: elys.perpetual.GenesisState.perpetual_counter:type_name -> elys.perpetual.PerpetualCounter - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 5, // 4: elys.perpetual.GenesisState.adl_counter:type_name -> elys.perpetual.ADLCounter + 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 + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_elys_perpetual_genesis_proto_init() } diff --git a/api/elys/perpetual/params.pulsar.go b/api/elys/perpetual/params.pulsar.go index 75035fcca..fbd5a2fc5 100644 --- a/api/elys/perpetual/params.pulsar.go +++ b/api/elys/perpetual/params.pulsar.go @@ -14,1838 +14,6 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_LegacyParams_22_list)(nil) - -type _LegacyParams_22_list struct { - list *[]uint64 -} - -func (x *_LegacyParams_22_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LegacyParams_22_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_LegacyParams_22_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_LegacyParams_22_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_LegacyParams_22_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message LegacyParams at list field EnabledPools as it is not of Message kind")) -} - -func (x *_LegacyParams_22_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_LegacyParams_22_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_LegacyParams_22_list) IsValid() bool { - return x.list != nil -} - -var ( - md_LegacyParams protoreflect.MessageDescriptor - fd_LegacyParams_leverage_max protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_max protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_min protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_increase protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_decrease protoreflect.FieldDescriptor - fd_LegacyParams_health_gain_factor protoreflect.FieldDescriptor - fd_LegacyParams_max_open_positions protoreflect.FieldDescriptor - fd_LegacyParams_pool_max_liabilities_threshold protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_payment_fund_percentage protoreflect.FieldDescriptor - fd_LegacyParams_legacy_borrow_interest_payment_fund_address protoreflect.FieldDescriptor - fd_LegacyParams_safety_factor protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_payment_enabled protoreflect.FieldDescriptor - fd_LegacyParams_whitelisting_enabled protoreflect.FieldDescriptor - fd_LegacyParams_perpetual_swap_fee protoreflect.FieldDescriptor - fd_LegacyParams_max_limit_order protoreflect.FieldDescriptor - fd_LegacyParams_fixed_funding_rate protoreflect.FieldDescriptor - fd_LegacyParams_minimum_long_take_profit_price_ratio protoreflect.FieldDescriptor - fd_LegacyParams_maximum_long_take_profit_price_ratio protoreflect.FieldDescriptor - fd_LegacyParams_maximum_short_take_profit_price_ratio protoreflect.FieldDescriptor - fd_LegacyParams_enable_take_profit_custody_liabilities protoreflect.FieldDescriptor - fd_LegacyParams_weight_breaking_fee_factor protoreflect.FieldDescriptor - fd_LegacyParams_enabled_pools protoreflect.FieldDescriptor -) - -func init() { - file_elys_perpetual_params_proto_init() - md_LegacyParams = File_elys_perpetual_params_proto.Messages().ByName("LegacyParams") - fd_LegacyParams_leverage_max = md_LegacyParams.Fields().ByName("leverage_max") - fd_LegacyParams_borrow_interest_rate_max = md_LegacyParams.Fields().ByName("borrow_interest_rate_max") - fd_LegacyParams_borrow_interest_rate_min = md_LegacyParams.Fields().ByName("borrow_interest_rate_min") - fd_LegacyParams_borrow_interest_rate_increase = md_LegacyParams.Fields().ByName("borrow_interest_rate_increase") - fd_LegacyParams_borrow_interest_rate_decrease = md_LegacyParams.Fields().ByName("borrow_interest_rate_decrease") - fd_LegacyParams_health_gain_factor = md_LegacyParams.Fields().ByName("health_gain_factor") - fd_LegacyParams_max_open_positions = md_LegacyParams.Fields().ByName("max_open_positions") - fd_LegacyParams_pool_max_liabilities_threshold = md_LegacyParams.Fields().ByName("pool_max_liabilities_threshold") - fd_LegacyParams_borrow_interest_payment_fund_percentage = md_LegacyParams.Fields().ByName("borrow_interest_payment_fund_percentage") - fd_LegacyParams_legacy_borrow_interest_payment_fund_address = md_LegacyParams.Fields().ByName("legacy_borrow_interest_payment_fund_address") - fd_LegacyParams_safety_factor = md_LegacyParams.Fields().ByName("safety_factor") - fd_LegacyParams_borrow_interest_payment_enabled = md_LegacyParams.Fields().ByName("borrow_interest_payment_enabled") - fd_LegacyParams_whitelisting_enabled = md_LegacyParams.Fields().ByName("whitelisting_enabled") - fd_LegacyParams_perpetual_swap_fee = md_LegacyParams.Fields().ByName("perpetual_swap_fee") - fd_LegacyParams_max_limit_order = md_LegacyParams.Fields().ByName("max_limit_order") - fd_LegacyParams_fixed_funding_rate = md_LegacyParams.Fields().ByName("fixed_funding_rate") - fd_LegacyParams_minimum_long_take_profit_price_ratio = md_LegacyParams.Fields().ByName("minimum_long_take_profit_price_ratio") - fd_LegacyParams_maximum_long_take_profit_price_ratio = md_LegacyParams.Fields().ByName("maximum_long_take_profit_price_ratio") - fd_LegacyParams_maximum_short_take_profit_price_ratio = md_LegacyParams.Fields().ByName("maximum_short_take_profit_price_ratio") - fd_LegacyParams_enable_take_profit_custody_liabilities = md_LegacyParams.Fields().ByName("enable_take_profit_custody_liabilities") - fd_LegacyParams_weight_breaking_fee_factor = md_LegacyParams.Fields().ByName("weight_breaking_fee_factor") - fd_LegacyParams_enabled_pools = md_LegacyParams.Fields().ByName("enabled_pools") -} - -var _ protoreflect.Message = (*fastReflection_LegacyParams)(nil) - -type fastReflection_LegacyParams LegacyParams - -func (x *LegacyParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_LegacyParams)(x) -} - -func (x *LegacyParams) slowProtoReflect() protoreflect.Message { - mi := &file_elys_perpetual_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_LegacyParams_messageType fastReflection_LegacyParams_messageType -var _ protoreflect.MessageType = fastReflection_LegacyParams_messageType{} - -type fastReflection_LegacyParams_messageType struct{} - -func (x fastReflection_LegacyParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_LegacyParams)(nil) -} -func (x fastReflection_LegacyParams_messageType) New() protoreflect.Message { - return new(fastReflection_LegacyParams) -} -func (x fastReflection_LegacyParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LegacyParams) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyParams -} - -// 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_LegacyParams) Type() protoreflect.MessageType { - return _fastReflection_LegacyParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LegacyParams) New() protoreflect.Message { - return new(fastReflection_LegacyParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LegacyParams) Interface() protoreflect.ProtoMessage { - return (*LegacyParams)(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_LegacyParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.LeverageMax != "" { - value := protoreflect.ValueOfString(x.LeverageMax) - if !f(fd_LegacyParams_leverage_max, value) { - return - } - } - if x.BorrowInterestRateMax != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateMax) - if !f(fd_LegacyParams_borrow_interest_rate_max, value) { - return - } - } - if x.BorrowInterestRateMin != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateMin) - if !f(fd_LegacyParams_borrow_interest_rate_min, value) { - return - } - } - if x.BorrowInterestRateIncrease != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateIncrease) - if !f(fd_LegacyParams_borrow_interest_rate_increase, value) { - return - } - } - if x.BorrowInterestRateDecrease != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateDecrease) - if !f(fd_LegacyParams_borrow_interest_rate_decrease, value) { - return - } - } - if x.HealthGainFactor != "" { - value := protoreflect.ValueOfString(x.HealthGainFactor) - if !f(fd_LegacyParams_health_gain_factor, value) { - return - } - } - if x.MaxOpenPositions != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxOpenPositions) - if !f(fd_LegacyParams_max_open_positions, value) { - return - } - } - if x.PoolMaxLiabilitiesThreshold != "" { - value := protoreflect.ValueOfString(x.PoolMaxLiabilitiesThreshold) - if !f(fd_LegacyParams_pool_max_liabilities_threshold, value) { - return - } - } - if x.BorrowInterestPaymentFundPercentage != "" { - value := protoreflect.ValueOfString(x.BorrowInterestPaymentFundPercentage) - if !f(fd_LegacyParams_borrow_interest_payment_fund_percentage, value) { - return - } - } - if x.LegacyBorrowInterestPaymentFundAddress != "" { - value := protoreflect.ValueOfString(x.LegacyBorrowInterestPaymentFundAddress) - if !f(fd_LegacyParams_legacy_borrow_interest_payment_fund_address, value) { - return - } - } - if x.SafetyFactor != "" { - value := protoreflect.ValueOfString(x.SafetyFactor) - if !f(fd_LegacyParams_safety_factor, value) { - return - } - } - if x.BorrowInterestPaymentEnabled != false { - value := protoreflect.ValueOfBool(x.BorrowInterestPaymentEnabled) - if !f(fd_LegacyParams_borrow_interest_payment_enabled, value) { - return - } - } - if x.WhitelistingEnabled != false { - value := protoreflect.ValueOfBool(x.WhitelistingEnabled) - if !f(fd_LegacyParams_whitelisting_enabled, value) { - return - } - } - if x.PerpetualSwapFee != "" { - value := protoreflect.ValueOfString(x.PerpetualSwapFee) - if !f(fd_LegacyParams_perpetual_swap_fee, value) { - return - } - } - if x.MaxLimitOrder != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxLimitOrder) - if !f(fd_LegacyParams_max_limit_order, value) { - return - } - } - if x.FixedFundingRate != "" { - value := protoreflect.ValueOfString(x.FixedFundingRate) - if !f(fd_LegacyParams_fixed_funding_rate, value) { - return - } - } - if x.MinimumLongTakeProfitPriceRatio != "" { - value := protoreflect.ValueOfString(x.MinimumLongTakeProfitPriceRatio) - if !f(fd_LegacyParams_minimum_long_take_profit_price_ratio, value) { - return - } - } - if x.MaximumLongTakeProfitPriceRatio != "" { - value := protoreflect.ValueOfString(x.MaximumLongTakeProfitPriceRatio) - if !f(fd_LegacyParams_maximum_long_take_profit_price_ratio, value) { - return - } - } - if x.MaximumShortTakeProfitPriceRatio != "" { - value := protoreflect.ValueOfString(x.MaximumShortTakeProfitPriceRatio) - if !f(fd_LegacyParams_maximum_short_take_profit_price_ratio, value) { - return - } - } - if x.EnableTakeProfitCustodyLiabilities != false { - value := protoreflect.ValueOfBool(x.EnableTakeProfitCustodyLiabilities) - if !f(fd_LegacyParams_enable_take_profit_custody_liabilities, value) { - return - } - } - if x.WeightBreakingFeeFactor != "" { - value := protoreflect.ValueOfString(x.WeightBreakingFeeFactor) - if !f(fd_LegacyParams_weight_breaking_fee_factor, value) { - return - } - } - if len(x.EnabledPools) != 0 { - value := protoreflect.ValueOfList(&_LegacyParams_22_list{list: &x.EnabledPools}) - if !f(fd_LegacyParams_enabled_pools, 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_LegacyParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - return x.LeverageMax != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - return x.BorrowInterestRateMax != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - return x.BorrowInterestRateMin != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - return x.BorrowInterestRateIncrease != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - return x.BorrowInterestRateDecrease != "" - case "elys.perpetual.LegacyParams.health_gain_factor": - return x.HealthGainFactor != "" - case "elys.perpetual.LegacyParams.max_open_positions": - return x.MaxOpenPositions != int64(0) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - return x.PoolMaxLiabilitiesThreshold != "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - return x.BorrowInterestPaymentFundPercentage != "" - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - return x.LegacyBorrowInterestPaymentFundAddress != "" - case "elys.perpetual.LegacyParams.safety_factor": - return x.SafetyFactor != "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - return x.BorrowInterestPaymentEnabled != false - case "elys.perpetual.LegacyParams.whitelisting_enabled": - return x.WhitelistingEnabled != false - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - return x.PerpetualSwapFee != "" - case "elys.perpetual.LegacyParams.max_limit_order": - return x.MaxLimitOrder != int64(0) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - return x.FixedFundingRate != "" - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - return x.MinimumLongTakeProfitPriceRatio != "" - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - return x.MaximumLongTakeProfitPriceRatio != "" - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - return x.MaximumShortTakeProfitPriceRatio != "" - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - return x.EnableTakeProfitCustodyLiabilities != false - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - return x.WeightBreakingFeeFactor != "" - case "elys.perpetual.LegacyParams.enabled_pools": - return len(x.EnabledPools) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - x.LeverageMax = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - x.BorrowInterestRateMax = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - x.BorrowInterestRateMin = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - x.BorrowInterestRateIncrease = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - x.BorrowInterestRateDecrease = "" - case "elys.perpetual.LegacyParams.health_gain_factor": - x.HealthGainFactor = "" - case "elys.perpetual.LegacyParams.max_open_positions": - x.MaxOpenPositions = int64(0) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - x.PoolMaxLiabilitiesThreshold = "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - x.BorrowInterestPaymentFundPercentage = "" - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - x.LegacyBorrowInterestPaymentFundAddress = "" - case "elys.perpetual.LegacyParams.safety_factor": - x.SafetyFactor = "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - x.BorrowInterestPaymentEnabled = false - case "elys.perpetual.LegacyParams.whitelisting_enabled": - x.WhitelistingEnabled = false - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - x.PerpetualSwapFee = "" - case "elys.perpetual.LegacyParams.max_limit_order": - x.MaxLimitOrder = int64(0) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - x.FixedFundingRate = "" - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - x.MinimumLongTakeProfitPriceRatio = "" - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - x.MaximumLongTakeProfitPriceRatio = "" - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - x.MaximumShortTakeProfitPriceRatio = "" - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - x.EnableTakeProfitCustodyLiabilities = false - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - x.WeightBreakingFeeFactor = "" - case "elys.perpetual.LegacyParams.enabled_pools": - x.EnabledPools = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - value := x.LeverageMax - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - value := x.BorrowInterestRateMax - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - value := x.BorrowInterestRateMin - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - value := x.BorrowInterestRateIncrease - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - value := x.BorrowInterestRateDecrease - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.health_gain_factor": - value := x.HealthGainFactor - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.max_open_positions": - value := x.MaxOpenPositions - return protoreflect.ValueOfInt64(value) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - value := x.PoolMaxLiabilitiesThreshold - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - value := x.BorrowInterestPaymentFundPercentage - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - value := x.LegacyBorrowInterestPaymentFundAddress - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.safety_factor": - value := x.SafetyFactor - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - value := x.BorrowInterestPaymentEnabled - return protoreflect.ValueOfBool(value) - case "elys.perpetual.LegacyParams.whitelisting_enabled": - value := x.WhitelistingEnabled - return protoreflect.ValueOfBool(value) - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - value := x.PerpetualSwapFee - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.max_limit_order": - value := x.MaxLimitOrder - return protoreflect.ValueOfInt64(value) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - value := x.FixedFundingRate - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - value := x.MinimumLongTakeProfitPriceRatio - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - value := x.MaximumLongTakeProfitPriceRatio - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - value := x.MaximumShortTakeProfitPriceRatio - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - value := x.EnableTakeProfitCustodyLiabilities - return protoreflect.ValueOfBool(value) - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - value := x.WeightBreakingFeeFactor - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.enabled_pools": - if len(x.EnabledPools) == 0 { - return protoreflect.ValueOfList(&_LegacyParams_22_list{}) - } - listValue := &_LegacyParams_22_list{list: &x.EnabledPools} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - x.LeverageMax = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - x.BorrowInterestRateMax = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - x.BorrowInterestRateMin = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - x.BorrowInterestRateIncrease = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - x.BorrowInterestRateDecrease = value.Interface().(string) - case "elys.perpetual.LegacyParams.health_gain_factor": - x.HealthGainFactor = value.Interface().(string) - case "elys.perpetual.LegacyParams.max_open_positions": - x.MaxOpenPositions = value.Int() - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - x.PoolMaxLiabilitiesThreshold = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - x.BorrowInterestPaymentFundPercentage = value.Interface().(string) - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - x.LegacyBorrowInterestPaymentFundAddress = value.Interface().(string) - case "elys.perpetual.LegacyParams.safety_factor": - x.SafetyFactor = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - x.BorrowInterestPaymentEnabled = value.Bool() - case "elys.perpetual.LegacyParams.whitelisting_enabled": - x.WhitelistingEnabled = value.Bool() - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - x.PerpetualSwapFee = value.Interface().(string) - case "elys.perpetual.LegacyParams.max_limit_order": - x.MaxLimitOrder = value.Int() - case "elys.perpetual.LegacyParams.fixed_funding_rate": - x.FixedFundingRate = value.Interface().(string) - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - x.MinimumLongTakeProfitPriceRatio = value.Interface().(string) - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - x.MaximumLongTakeProfitPriceRatio = value.Interface().(string) - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - x.MaximumShortTakeProfitPriceRatio = value.Interface().(string) - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - x.EnableTakeProfitCustodyLiabilities = value.Bool() - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - x.WeightBreakingFeeFactor = value.Interface().(string) - case "elys.perpetual.LegacyParams.enabled_pools": - lv := value.List() - clv := lv.(*_LegacyParams_22_list) - x.EnabledPools = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.enabled_pools": - if x.EnabledPools == nil { - x.EnabledPools = []uint64{} - } - value := &_LegacyParams_22_list{list: &x.EnabledPools} - return protoreflect.ValueOfList(value) - case "elys.perpetual.LegacyParams.leverage_max": - panic(fmt.Errorf("field leverage_max of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - panic(fmt.Errorf("field borrow_interest_rate_max of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - panic(fmt.Errorf("field borrow_interest_rate_min of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - panic(fmt.Errorf("field borrow_interest_rate_increase of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - panic(fmt.Errorf("field borrow_interest_rate_decrease of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.health_gain_factor": - panic(fmt.Errorf("field health_gain_factor of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.max_open_positions": - panic(fmt.Errorf("field max_open_positions of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - panic(fmt.Errorf("field pool_max_liabilities_threshold of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - panic(fmt.Errorf("field borrow_interest_payment_fund_percentage of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - panic(fmt.Errorf("field legacy_borrow_interest_payment_fund_address of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.safety_factor": - panic(fmt.Errorf("field safety_factor of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - panic(fmt.Errorf("field borrow_interest_payment_enabled of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.whitelisting_enabled": - panic(fmt.Errorf("field whitelisting_enabled of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - panic(fmt.Errorf("field perpetual_swap_fee of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.max_limit_order": - panic(fmt.Errorf("field max_limit_order of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - panic(fmt.Errorf("field fixed_funding_rate of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - panic(fmt.Errorf("field minimum_long_take_profit_price_ratio of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - panic(fmt.Errorf("field maximum_long_take_profit_price_ratio of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - panic(fmt.Errorf("field maximum_short_take_profit_price_ratio of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - panic(fmt.Errorf("field enable_take_profit_custody_liabilities of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - panic(fmt.Errorf("field weight_breaking_fee_factor of message elys.perpetual.LegacyParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.health_gain_factor": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.max_open_positions": - return protoreflect.ValueOfInt64(int64(0)) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.safety_factor": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - return protoreflect.ValueOfBool(false) - case "elys.perpetual.LegacyParams.whitelisting_enabled": - return protoreflect.ValueOfBool(false) - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.max_limit_order": - return protoreflect.ValueOfInt64(int64(0)) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - return protoreflect.ValueOfBool(false) - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.enabled_pools": - list := []uint64{} - return protoreflect.ValueOfList(&_LegacyParams_22_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in elys.perpetual.LegacyParams", 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_LegacyParams) 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_LegacyParams) 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_LegacyParams) 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_LegacyParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LegacyParams) - 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.LeverageMax) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateMax) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateMin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateIncrease) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateDecrease) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HealthGainFactor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxOpenPositions != 0 { - n += 1 + runtime.Sov(uint64(x.MaxOpenPositions)) - } - l = len(x.PoolMaxLiabilitiesThreshold) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestPaymentFundPercentage) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LegacyBorrowInterestPaymentFundAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SafetyFactor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BorrowInterestPaymentEnabled { - n += 2 - } - if x.WhitelistingEnabled { - n += 2 - } - l = len(x.PerpetualSwapFee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxLimitOrder != 0 { - n += 1 + runtime.Sov(uint64(x.MaxLimitOrder)) - } - l = len(x.FixedFundingRate) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinimumLongTakeProfitPriceRatio) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaximumLongTakeProfitPriceRatio) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaximumShortTakeProfitPriceRatio) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.EnableTakeProfitCustodyLiabilities { - n += 3 - } - l = len(x.WeightBreakingFeeFactor) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if len(x.EnabledPools) > 0 { - l = 0 - for _, e := range x.EnabledPools { - l += runtime.Sov(uint64(e)) - } - n += 2 + 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().(*LegacyParams) - 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.EnabledPools) > 0 { - var pksize2 int - for _, num := range x.EnabledPools { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.EnabledPools { - 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] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if len(x.WeightBreakingFeeFactor) > 0 { - i -= len(x.WeightBreakingFeeFactor) - copy(dAtA[i:], x.WeightBreakingFeeFactor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WeightBreakingFeeFactor))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if x.EnableTakeProfitCustodyLiabilities { - i-- - if x.EnableTakeProfitCustodyLiabilities { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if len(x.MaximumShortTakeProfitPriceRatio) > 0 { - i -= len(x.MaximumShortTakeProfitPriceRatio) - copy(dAtA[i:], x.MaximumShortTakeProfitPriceRatio) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaximumShortTakeProfitPriceRatio))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - if len(x.MaximumLongTakeProfitPriceRatio) > 0 { - i -= len(x.MaximumLongTakeProfitPriceRatio) - copy(dAtA[i:], x.MaximumLongTakeProfitPriceRatio) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaximumLongTakeProfitPriceRatio))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(x.MinimumLongTakeProfitPriceRatio) > 0 { - i -= len(x.MinimumLongTakeProfitPriceRatio) - copy(dAtA[i:], x.MinimumLongTakeProfitPriceRatio) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinimumLongTakeProfitPriceRatio))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(x.FixedFundingRate) > 0 { - i -= len(x.FixedFundingRate) - copy(dAtA[i:], x.FixedFundingRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FixedFundingRate))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if x.MaxLimitOrder != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxLimitOrder)) - i-- - dAtA[i] = 0x78 - } - if len(x.PerpetualSwapFee) > 0 { - i -= len(x.PerpetualSwapFee) - copy(dAtA[i:], x.PerpetualSwapFee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PerpetualSwapFee))) - i-- - dAtA[i] = 0x72 - } - if x.WhitelistingEnabled { - i-- - if x.WhitelistingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - if x.BorrowInterestPaymentEnabled { - i-- - if x.BorrowInterestPaymentEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if len(x.SafetyFactor) > 0 { - i -= len(x.SafetyFactor) - copy(dAtA[i:], x.SafetyFactor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SafetyFactor))) - i-- - dAtA[i] = 0x5a - } - if len(x.LegacyBorrowInterestPaymentFundAddress) > 0 { - i -= len(x.LegacyBorrowInterestPaymentFundAddress) - copy(dAtA[i:], x.LegacyBorrowInterestPaymentFundAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LegacyBorrowInterestPaymentFundAddress))) - i-- - dAtA[i] = 0x52 - } - if len(x.BorrowInterestPaymentFundPercentage) > 0 { - i -= len(x.BorrowInterestPaymentFundPercentage) - copy(dAtA[i:], x.BorrowInterestPaymentFundPercentage) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestPaymentFundPercentage))) - i-- - dAtA[i] = 0x4a - } - if len(x.PoolMaxLiabilitiesThreshold) > 0 { - i -= len(x.PoolMaxLiabilitiesThreshold) - copy(dAtA[i:], x.PoolMaxLiabilitiesThreshold) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PoolMaxLiabilitiesThreshold))) - i-- - dAtA[i] = 0x42 - } - if x.MaxOpenPositions != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxOpenPositions)) - i-- - dAtA[i] = 0x38 - } - if len(x.HealthGainFactor) > 0 { - i -= len(x.HealthGainFactor) - copy(dAtA[i:], x.HealthGainFactor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HealthGainFactor))) - i-- - dAtA[i] = 0x32 - } - if len(x.BorrowInterestRateDecrease) > 0 { - i -= len(x.BorrowInterestRateDecrease) - copy(dAtA[i:], x.BorrowInterestRateDecrease) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateDecrease))) - i-- - dAtA[i] = 0x2a - } - if len(x.BorrowInterestRateIncrease) > 0 { - i -= len(x.BorrowInterestRateIncrease) - copy(dAtA[i:], x.BorrowInterestRateIncrease) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateIncrease))) - i-- - dAtA[i] = 0x22 - } - if len(x.BorrowInterestRateMin) > 0 { - i -= len(x.BorrowInterestRateMin) - copy(dAtA[i:], x.BorrowInterestRateMin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateMin))) - i-- - dAtA[i] = 0x1a - } - if len(x.BorrowInterestRateMax) > 0 { - i -= len(x.BorrowInterestRateMax) - copy(dAtA[i:], x.BorrowInterestRateMax) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateMax))) - i-- - dAtA[i] = 0x12 - } - if len(x.LeverageMax) > 0 { - i -= len(x.LeverageMax) - copy(dAtA[i:], x.LeverageMax) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LeverageMax))) - 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().(*LegacyParams) - 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: LegacyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LegacyParams: 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 LeverageMax", 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.LeverageMax = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMax", 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.BorrowInterestRateMax = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMin", 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.BorrowInterestRateMin = 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 BorrowInterestRateIncrease", 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.BorrowInterestRateIncrease = 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 BorrowInterestRateDecrease", 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.BorrowInterestRateDecrease = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HealthGainFactor", 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.HealthGainFactor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxOpenPositions", wireType) - } - x.MaxOpenPositions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxOpenPositions |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PoolMaxLiabilitiesThreshold", 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.PoolMaxLiabilitiesThreshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentFundPercentage", 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.BorrowInterestPaymentFundPercentage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LegacyBorrowInterestPaymentFundAddress", 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.LegacyBorrowInterestPaymentFundAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SafetyFactor", 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.SafetyFactor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentEnabled", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.BorrowInterestPaymentEnabled = bool(v != 0) - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistingEnabled", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.WhitelistingEnabled = bool(v != 0) - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PerpetualSwapFee", 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.PerpetualSwapFee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxLimitOrder", wireType) - } - x.MaxLimitOrder = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxLimitOrder |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FixedFundingRate", 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.FixedFundingRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinimumLongTakeProfitPriceRatio", 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.MinimumLongTakeProfitPriceRatio = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumLongTakeProfitPriceRatio", 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.MaximumLongTakeProfitPriceRatio = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 19: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumShortTakeProfitPriceRatio", 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.MaximumShortTakeProfitPriceRatio = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EnableTakeProfitCustodyLiabilities", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EnableTakeProfitCustodyLiabilities = bool(v != 0) - case 21: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WeightBreakingFeeFactor", 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.WeightBreakingFeeFactor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 22: - if wireType == 0 { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EnabledPools = append(x.EnabledPools, 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.EnabledPools) == 0 { - x.EnabledPools = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EnabledPools = append(x.EnabledPools, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EnabledPools", 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 = (*_Params_20_list)(nil) type _Params_20_list struct { @@ -1917,6 +85,7 @@ var ( fd_Params_minimum_notional_value protoreflect.FieldDescriptor fd_Params_long_minimum_liability_amount protoreflect.FieldDescriptor fd_Params_exit_buffer protoreflect.FieldDescriptor + fd_Params_number_per_block protoreflect.FieldDescriptor ) func init() { @@ -1945,6 +114,7 @@ func init() { fd_Params_minimum_notional_value = md_Params.Fields().ByName("minimum_notional_value") fd_Params_long_minimum_liability_amount = md_Params.Fields().ByName("long_minimum_liability_amount") fd_Params_exit_buffer = md_Params.Fields().ByName("exit_buffer") + fd_Params_number_per_block = md_Params.Fields().ByName("number_per_block") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -1956,7 +126,7 @@ func (x *Params) ProtoReflect() protoreflect.Message { } func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_elys_perpetual_params_proto_msgTypes[1] + mi := &file_elys_perpetual_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2150,6 +320,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.NumberPerBlock != uint64(0) { + value := protoreflect.ValueOfUint64(x.NumberPerBlock) + if !f(fd_Params_number_per_block, value) { + return + } + } } // Has reports whether a field is populated. @@ -2211,6 +387,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.LongMinimumLiabilityAmount != "" case "elys.perpetual.Params.exit_buffer": return x.ExitBuffer != "" + case "elys.perpetual.Params.number_per_block": + return x.NumberPerBlock != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2273,6 +451,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.LongMinimumLiabilityAmount = "" case "elys.perpetual.Params.exit_buffer": x.ExitBuffer = "" + case "elys.perpetual.Params.number_per_block": + x.NumberPerBlock = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2361,6 +541,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "elys.perpetual.Params.exit_buffer": value := x.ExitBuffer return protoreflect.ValueOfString(value) + case "elys.perpetual.Params.number_per_block": + value := x.NumberPerBlock + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2429,6 +612,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.LongMinimumLiabilityAmount = value.Interface().(string) case "elys.perpetual.Params.exit_buffer": x.ExitBuffer = value.Interface().(string) + case "elys.perpetual.Params.number_per_block": + x.NumberPerBlock = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2499,6 +684,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field long_minimum_liability_amount of message elys.perpetual.Params is not mutable")) case "elys.perpetual.Params.exit_buffer": panic(fmt.Errorf("field exit_buffer of message elys.perpetual.Params is not mutable")) + case "elys.perpetual.Params.number_per_block": + panic(fmt.Errorf("field number_per_block of message elys.perpetual.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2559,6 +746,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfString("") case "elys.perpetual.Params.exit_buffer": return protoreflect.ValueOfString("") + case "elys.perpetual.Params.number_per_block": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2719,6 +908,9 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if l > 0 { n += 2 + l + runtime.Sov(uint64(l)) } + if x.NumberPerBlock != 0 { + n += 2 + runtime.Sov(uint64(x.NumberPerBlock)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2748,6 +940,13 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.NumberPerBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NumberPerBlock)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc0 + } if len(x.ExitBuffer) > 0 { i -= len(x.ExitBuffer) copy(dAtA[i:], x.ExitBuffer) @@ -3719,6 +1918,25 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.ExitBuffer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 24: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NumberPerBlock", wireType) + } + x.NumberPerBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.NumberPerBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3767,226 +1985,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type LegacyParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LeverageMax string `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3" json:"leverage_max,omitempty"` - BorrowInterestRateMax string `protobuf:"bytes,2,opt,name=borrow_interest_rate_max,json=borrowInterestRateMax,proto3" json:"borrow_interest_rate_max,omitempty"` - BorrowInterestRateMin string `protobuf:"bytes,3,opt,name=borrow_interest_rate_min,json=borrowInterestRateMin,proto3" json:"borrow_interest_rate_min,omitempty"` - BorrowInterestRateIncrease string `protobuf:"bytes,4,opt,name=borrow_interest_rate_increase,json=borrowInterestRateIncrease,proto3" json:"borrow_interest_rate_increase,omitempty"` - BorrowInterestRateDecrease string `protobuf:"bytes,5,opt,name=borrow_interest_rate_decrease,json=borrowInterestRateDecrease,proto3" json:"borrow_interest_rate_decrease,omitempty"` - HealthGainFactor string `protobuf:"bytes,6,opt,name=health_gain_factor,json=healthGainFactor,proto3" json:"health_gain_factor,omitempty"` - MaxOpenPositions int64 `protobuf:"varint,7,opt,name=max_open_positions,json=maxOpenPositions,proto3" json:"max_open_positions,omitempty"` - PoolMaxLiabilitiesThreshold string `protobuf:"bytes,8,opt,name=pool_max_liabilities_threshold,json=poolMaxLiabilitiesThreshold,proto3" json:"pool_max_liabilities_threshold,omitempty"` - BorrowInterestPaymentFundPercentage string `protobuf:"bytes,9,opt,name=borrow_interest_payment_fund_percentage,json=borrowInterestPaymentFundPercentage,proto3" json:"borrow_interest_payment_fund_percentage,omitempty"` - LegacyBorrowInterestPaymentFundAddress string `protobuf:"bytes,10,opt,name=legacy_borrow_interest_payment_fund_address,json=legacyBorrowInterestPaymentFundAddress,proto3" json:"legacy_borrow_interest_payment_fund_address,omitempty"` - SafetyFactor string `protobuf:"bytes,11,opt,name=safety_factor,json=safetyFactor,proto3" json:"safety_factor,omitempty"` - BorrowInterestPaymentEnabled bool `protobuf:"varint,12,opt,name=borrow_interest_payment_enabled,json=borrowInterestPaymentEnabled,proto3" json:"borrow_interest_payment_enabled,omitempty"` - WhitelistingEnabled bool `protobuf:"varint,13,opt,name=whitelisting_enabled,json=whitelistingEnabled,proto3" json:"whitelisting_enabled,omitempty"` - PerpetualSwapFee string `protobuf:"bytes,14,opt,name=perpetual_swap_fee,json=perpetualSwapFee,proto3" json:"perpetual_swap_fee,omitempty"` - MaxLimitOrder int64 `protobuf:"varint,15,opt,name=max_limit_order,json=maxLimitOrder,proto3" json:"max_limit_order,omitempty"` - FixedFundingRate string `protobuf:"bytes,16,opt,name=fixed_funding_rate,json=fixedFundingRate,proto3" json:"fixed_funding_rate,omitempty"` - // minimum value for take_profit_price/current price for long, should be - // greater than 1 - MinimumLongTakeProfitPriceRatio string `protobuf:"bytes,17,opt,name=minimum_long_take_profit_price_ratio,json=minimumLongTakeProfitPriceRatio,proto3" json:"minimum_long_take_profit_price_ratio,omitempty"` - // max value for take_profit_price/current price for long, should be greater - // than 1 - MaximumLongTakeProfitPriceRatio string `protobuf:"bytes,18,opt,name=maximum_long_take_profit_price_ratio,json=maximumLongTakeProfitPriceRatio,proto3" json:"maximum_long_take_profit_price_ratio,omitempty"` - // max value for take_profit_price/current price for short, should be less - // than 1 - MaximumShortTakeProfitPriceRatio string `protobuf:"bytes,19,opt,name=maximum_short_take_profit_price_ratio,json=maximumShortTakeProfitPriceRatio,proto3" json:"maximum_short_take_profit_price_ratio,omitempty"` - // No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in - // validate message - EnableTakeProfitCustodyLiabilities bool `protobuf:"varint,20,opt,name=enable_take_profit_custody_liabilities,json=enableTakeProfitCustodyLiabilities,proto3" json:"enable_take_profit_custody_liabilities,omitempty"` - // We create this and send this value to estimate swap ONLY when opening and - // closing the position Ideally this value is set to half. When trader open a - // position if they receive a weight balance bonus (which is half of weight - // breaking fee, ideally) then while closing position they are charged weight - // breaking fee. So we just directly apply half weight breaking fee on - // perpetual swaps Question: does each need to have separate value of this - // because PoolParams.WeightRecoveryFeePortion can be different Also, if - // trader has no bonus only fee, then overall we are only applying the fee - // half time - WeightBreakingFeeFactor string `protobuf:"bytes,21,opt,name=weight_breaking_fee_factor,json=weightBreakingFeeFactor,proto3" json:"weight_breaking_fee_factor,omitempty"` - EnabledPools []uint64 `protobuf:"varint,22,rep,packed,name=enabled_pools,json=enabledPools,proto3" json:"enabled_pools,omitempty"` -} - -func (x *LegacyParams) Reset() { - *x = LegacyParams{} - if protoimpl.UnsafeEnabled { - mi := &file_elys_perpetual_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LegacyParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LegacyParams) ProtoMessage() {} - -// Deprecated: Use LegacyParams.ProtoReflect.Descriptor instead. -func (*LegacyParams) Descriptor() ([]byte, []int) { - return file_elys_perpetual_params_proto_rawDescGZIP(), []int{0} -} - -func (x *LegacyParams) GetLeverageMax() string { - if x != nil { - return x.LeverageMax - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateMax() string { - if x != nil { - return x.BorrowInterestRateMax - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateMin() string { - if x != nil { - return x.BorrowInterestRateMin - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateIncrease() string { - if x != nil { - return x.BorrowInterestRateIncrease - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateDecrease() string { - if x != nil { - return x.BorrowInterestRateDecrease - } - return "" -} - -func (x *LegacyParams) GetHealthGainFactor() string { - if x != nil { - return x.HealthGainFactor - } - return "" -} - -func (x *LegacyParams) GetMaxOpenPositions() int64 { - if x != nil { - return x.MaxOpenPositions - } - return 0 -} - -func (x *LegacyParams) GetPoolMaxLiabilitiesThreshold() string { - if x != nil { - return x.PoolMaxLiabilitiesThreshold - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestPaymentFundPercentage() string { - if x != nil { - return x.BorrowInterestPaymentFundPercentage - } - return "" -} - -func (x *LegacyParams) GetLegacyBorrowInterestPaymentFundAddress() string { - if x != nil { - return x.LegacyBorrowInterestPaymentFundAddress - } - return "" -} - -func (x *LegacyParams) GetSafetyFactor() string { - if x != nil { - return x.SafetyFactor - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestPaymentEnabled() bool { - if x != nil { - return x.BorrowInterestPaymentEnabled - } - return false -} - -func (x *LegacyParams) GetWhitelistingEnabled() bool { - if x != nil { - return x.WhitelistingEnabled - } - return false -} - -func (x *LegacyParams) GetPerpetualSwapFee() string { - if x != nil { - return x.PerpetualSwapFee - } - return "" -} - -func (x *LegacyParams) GetMaxLimitOrder() int64 { - if x != nil { - return x.MaxLimitOrder - } - return 0 -} - -func (x *LegacyParams) GetFixedFundingRate() string { - if x != nil { - return x.FixedFundingRate - } - return "" -} - -func (x *LegacyParams) GetMinimumLongTakeProfitPriceRatio() string { - if x != nil { - return x.MinimumLongTakeProfitPriceRatio - } - return "" -} - -func (x *LegacyParams) GetMaximumLongTakeProfitPriceRatio() string { - if x != nil { - return x.MaximumLongTakeProfitPriceRatio - } - return "" -} - -func (x *LegacyParams) GetMaximumShortTakeProfitPriceRatio() string { - if x != nil { - return x.MaximumShortTakeProfitPriceRatio - } - return "" -} - -func (x *LegacyParams) GetEnableTakeProfitCustodyLiabilities() bool { - if x != nil { - return x.EnableTakeProfitCustodyLiabilities - } - return false -} - -func (x *LegacyParams) GetWeightBreakingFeeFactor() string { - if x != nil { - return x.WeightBreakingFeeFactor - } - return "" -} - -func (x *LegacyParams) GetEnabledPools() []uint64 { - if x != nil { - return x.EnabledPools - } - return nil -} - type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4030,12 +2028,13 @@ type Params struct { MinimumNotionalValue string `protobuf:"bytes,21,opt,name=minimum_notional_value,json=minimumNotionalValue,proto3" json:"minimum_notional_value,omitempty"` LongMinimumLiabilityAmount string `protobuf:"bytes,22,opt,name=long_minimum_liability_amount,json=longMinimumLiabilityAmount,proto3" json:"long_minimum_liability_amount,omitempty"` ExitBuffer string `protobuf:"bytes,23,opt,name=exit_buffer,json=exitBuffer,proto3" json:"exit_buffer,omitempty"` + NumberPerBlock uint64 `protobuf:"varint,24,opt,name=number_per_block,json=numberPerBlock,proto3" json:"number_per_block,omitempty"` // Number of positions to process per block } func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { - mi := &file_elys_perpetual_params_proto_msgTypes[1] + mi := &file_elys_perpetual_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4049,7 +2048,7 @@ func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { - return file_elys_perpetual_params_proto_rawDescGZIP(), []int{1} + return file_elys_perpetual_params_proto_rawDescGZIP(), []int{0} } func (x *Params) GetLeverageMax() string { @@ -4213,6 +2212,13 @@ func (x *Params) GetExitBuffer() string { return "" } +func (x *Params) GetNumberPerBlock() uint64 { + if x != nil { + return x.NumberPerBlock + } + return 0 +} + var File_elys_perpetual_params_proto protoreflect.FileDescriptor var file_elys_perpetual_params_proto_rawDesc = []byte{ @@ -4221,291 +2227,161 @@ var file_elys_perpetual_params_proto_rawDesc = []byte{ 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 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, 0xc6, - 0x10, 0x0a, 0x0c, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 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, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, - 0x67, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x61, - 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, 0x12, 0x74, 0x0a, + 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, + 0x11, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 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, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x12, + 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, + 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, + 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, + 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, + 0x74, 0x52, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x04, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, - 0x61, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, + 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x72, 0x65, + 0x61, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x67, 0x61, + 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x47, 0x61, 0x69, 0x6e, 0x46, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x10, 0x6d, 0x61, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x76, 0x0a, 0x1e, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x62, - 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x67, 0x61, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x47, 0x61, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, - 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x76, 0x0a, 0x1e, 0x70, 0x6f, 0x6f, 0x6c, - 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x1b, 0x70, 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x87, 0x01, 0x0a, 0x27, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x75, 0x6e, - 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1b, 0x70, + 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x87, 0x01, 0x0a, 0x27, 0x62, + 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x23, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x5f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, + 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x1f, + 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, + 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, + 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x23, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6e, 0x64, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5b, 0x0a, 0x2b, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x75, 0x6e, - 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x26, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6e, 0x64, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x73, 0x61, 0x66, 0x65, 0x74, - 0x79, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, - 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x0c, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x45, 0x0a, 0x1f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, - 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, - 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x70, 0x65, 0x72, - 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, - 0x78, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x12, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, - 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, - 0x61, 0x74, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x5f, 0x0a, 0x12, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, + 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, + 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, + 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, - 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, - 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x82, 0x01, 0x0a, 0x25, 0x6d, 0x61, - 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x61, 0x6b, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x20, 0x6d, 0x61, - 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x52, - 0x0a, 0x26, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x5f, 0x6c, 0x69, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x1a, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x17, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x46, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, - 0x6f, 0x6c, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0xbc, 0x11, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, - 0x61, 0x78, 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, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, - 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, - 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x82, 0x01, 0x0a, 0x25, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, - 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x49, 0x6e, - 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, - 0x52, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x12, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x67, 0x61, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x47, 0x61, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, - 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x4f, 0x70, - 0x65, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x76, 0x0a, 0x1e, 0x70, - 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1b, 0x70, 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x78, 0x4c, - 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x87, 0x01, 0x0a, 0x27, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x23, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, - 0x75, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, - 0x0d, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x46, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x1f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, - 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, - 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x77, 0x68, 0x69, 0x74, - 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x5f, 0x0a, 0x12, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x77, 0x61, - 0x70, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, - 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x12, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x80, 0x01, 0x0a, - 0x24, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, - 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, - 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, - 0x82, 0x01, 0x0a, 0x25, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, - 0x74, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x6e, 0x0a, 0x1a, 0x77, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, - 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, - 0x61, 0x74, 0x69, 0x6f, 0x12, 0x6e, 0x0a, 0x1a, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x17, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x46, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, - 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x14, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x6e, 0x0a, 0x1d, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x1a, 0x6c, 0x6f, 0x6e, 0x67, 0x4d, 0x69, 0x6e, 0x69, - 0x6d, 0x75, 0x6d, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, - 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, - 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0xae, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, - 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, - 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x52, 0x17, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x46, 0x65, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x14, 0x20, 0x03, + 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, + 0x12, 0x67, 0x0a, 0x16, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x14, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x6e, 0x0a, 0x1d, 0x6c, 0x6f, 0x6e, + 0x67, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x1a, 0x6c, + 0x6f, 0x6e, 0x67, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x65, 0x78, 0x69, + 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x28, 0x0a, + 0x10, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x50, + 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0xae, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, + 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, + 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4520,10 +2396,9 @@ func file_elys_perpetual_params_proto_rawDescGZIP() []byte { return file_elys_perpetual_params_proto_rawDescData } -var file_elys_perpetual_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_elys_perpetual_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_elys_perpetual_params_proto_goTypes = []interface{}{ - (*LegacyParams)(nil), // 0: elys.perpetual.LegacyParams - (*Params)(nil), // 1: elys.perpetual.Params + (*Params)(nil), // 0: elys.perpetual.Params } var file_elys_perpetual_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -4540,18 +2415,6 @@ func file_elys_perpetual_params_proto_init() { } if !protoimpl.UnsafeEnabled { file_elys_perpetual_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LegacyParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_elys_perpetual_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state @@ -4570,7 +2433,7 @@ func file_elys_perpetual_params_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_elys_perpetual_params_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/api/elys/perpetual/pool.pulsar.go b/api/elys/perpetual/pool.pulsar.go index 8b5e877be..ee6ba77e2 100644 --- a/api/elys/perpetual/pool.pulsar.go +++ b/api/elys/perpetual/pool.pulsar.go @@ -2718,6 +2718,7 @@ var ( fd_Pool_funding_rate protoreflect.FieldDescriptor fd_Pool_fees_collected protoreflect.FieldDescriptor fd_Pool_leverage_max protoreflect.FieldDescriptor + fd_Pool_adl_trigger_ratio protoreflect.FieldDescriptor ) func init() { @@ -2733,6 +2734,7 @@ func init() { fd_Pool_funding_rate = md_Pool.Fields().ByName("funding_rate") fd_Pool_fees_collected = md_Pool.Fields().ByName("fees_collected") fd_Pool_leverage_max = md_Pool.Fields().ByName("leverage_max") + fd_Pool_adl_trigger_ratio = md_Pool.Fields().ByName("adl_trigger_ratio") } var _ protoreflect.Message = (*fastReflection_Pool)(nil) @@ -2860,6 +2862,12 @@ func (x *fastReflection_Pool) Range(f func(protoreflect.FieldDescriptor, protore return } } + if x.AdlTriggerRatio != "" { + value := protoreflect.ValueOfString(x.AdlTriggerRatio) + if !f(fd_Pool_adl_trigger_ratio, value) { + return + } + } } // Has reports whether a field is populated. @@ -2895,6 +2903,8 @@ func (x *fastReflection_Pool) Has(fd protoreflect.FieldDescriptor) bool { return len(x.FeesCollected) != 0 case "elys.perpetual.Pool.leverage_max": return x.LeverageMax != "" + case "elys.perpetual.Pool.adl_trigger_ratio": + return x.AdlTriggerRatio != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Pool")) @@ -2931,6 +2941,8 @@ func (x *fastReflection_Pool) Clear(fd protoreflect.FieldDescriptor) { x.FeesCollected = nil case "elys.perpetual.Pool.leverage_max": x.LeverageMax = "" + case "elys.perpetual.Pool.adl_trigger_ratio": + x.AdlTriggerRatio = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Pool")) @@ -2986,6 +2998,9 @@ func (x *fastReflection_Pool) Get(descriptor protoreflect.FieldDescriptor) proto case "elys.perpetual.Pool.leverage_max": value := x.LeverageMax return protoreflect.ValueOfString(value) + case "elys.perpetual.Pool.adl_trigger_ratio": + value := x.AdlTriggerRatio + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Pool")) @@ -3032,6 +3047,8 @@ func (x *fastReflection_Pool) Set(fd protoreflect.FieldDescriptor, value protore x.FeesCollected = *clv.list case "elys.perpetual.Pool.leverage_max": x.LeverageMax = value.Interface().(string) + case "elys.perpetual.Pool.adl_trigger_ratio": + x.AdlTriggerRatio = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Pool")) @@ -3084,6 +3101,8 @@ func (x *fastReflection_Pool) Mutable(fd protoreflect.FieldDescriptor) protorefl panic(fmt.Errorf("field funding_rate of message elys.perpetual.Pool is not mutable")) case "elys.perpetual.Pool.leverage_max": panic(fmt.Errorf("field leverage_max of message elys.perpetual.Pool is not mutable")) + case "elys.perpetual.Pool.adl_trigger_ratio": + panic(fmt.Errorf("field adl_trigger_ratio of message elys.perpetual.Pool is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Pool")) @@ -3120,6 +3139,8 @@ func (x *fastReflection_Pool) NewField(fd protoreflect.FieldDescriptor) protoref return protoreflect.ValueOfList(&_Pool_9_list{list: &list}) case "elys.perpetual.Pool.leverage_max": return protoreflect.ValueOfString("") + case "elys.perpetual.Pool.adl_trigger_ratio": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Pool")) @@ -3233,6 +3254,10 @@ func (x *fastReflection_Pool) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.AdlTriggerRatio) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3262,6 +3287,13 @@ func (x *fastReflection_Pool) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.AdlTriggerRatio) > 0 { + i -= len(x.AdlTriggerRatio) + copy(dAtA[i:], x.AdlTriggerRatio) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AdlTriggerRatio))) + i-- + dAtA[i] = 0x5a + } if len(x.LeverageMax) > 0 { i -= len(x.LeverageMax) copy(dAtA[i:], x.LeverageMax) @@ -3704,6 +3736,38 @@ func (x *fastReflection_Pool) ProtoMethods() *protoiface.Methods { } x.LeverageMax = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AdlTriggerRatio", 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.AdlTriggerRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4507,9 +4571,10 @@ type Pool struct { PoolAssetsShort []*PoolAsset `protobuf:"bytes,6,rep,name=pool_assets_short,json=poolAssetsShort,proto3" json:"pool_assets_short,omitempty"` LastHeightBorrowInterestRateComputed int64 `protobuf:"varint,7,opt,name=last_height_borrow_interest_rate_computed,json=lastHeightBorrowInterestRateComputed,proto3" json:"last_height_borrow_interest_rate_computed,omitempty"` // funding rate, if positive longs pay shorts, if negative shorts pay longs - FundingRate string `protobuf:"bytes,8,opt,name=funding_rate,json=fundingRate,proto3" json:"funding_rate,omitempty"` - FeesCollected []*v1beta1.Coin `protobuf:"bytes,9,rep,name=fees_collected,json=feesCollected,proto3" json:"fees_collected,omitempty"` - LeverageMax string `protobuf:"bytes,10,opt,name=leverage_max,json=leverageMax,proto3" json:"leverage_max,omitempty"` + FundingRate string `protobuf:"bytes,8,opt,name=funding_rate,json=fundingRate,proto3" json:"funding_rate,omitempty"` + FeesCollected []*v1beta1.Coin `protobuf:"bytes,9,rep,name=fees_collected,json=feesCollected,proto3" json:"fees_collected,omitempty"` + LeverageMax string `protobuf:"bytes,10,opt,name=leverage_max,json=leverageMax,proto3" json:"leverage_max,omitempty"` + AdlTriggerRatio string `protobuf:"bytes,11,opt,name=adl_trigger_ratio,json=adlTriggerRatio,proto3" json:"adl_trigger_ratio,omitempty"` } func (x *Pool) Reset() { @@ -4602,6 +4667,13 @@ func (x *Pool) GetLeverageMax() string { return "" } +func (x *Pool) GetAdlTriggerRatio() string { + if x != nil { + return x.AdlTriggerRatio + } + return "" +} + type PerpetualCounter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4765,7 +4837,7 @@ var file_elys_perpetual_pool_proto_rawDesc = []byte{ 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6c, - 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x22, 0xda, 0x06, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x22, 0xb9, 0x07, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x6d, 0x6d, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x6d, 0x6d, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x72, 0x0a, 0x1c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, @@ -4819,25 +4891,31 @@ var file_elys_perpetual_pool_proto_rawDesc = []byte{ 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, - 0x65, 0x4d, 0x61, 0x78, 0x22, 0x6b, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, - 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x6d, 0x6d, 0x5f, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, - 0x6d, 0x6d, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x70, 0x65, - 0x6e, 0x42, 0xac, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x09, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, - 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, - 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, - 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x4d, 0x61, 0x78, 0x12, 0x5d, 0x0a, 0x11, 0x61, 0x64, 0x6c, 0x5f, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x0f, 0x61, 0x64, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x22, 0x6b, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0b, 0x61, 0x6d, 0x6d, 0x5f, 0x70, + 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x6d, + 0x6d, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4f, 0x70, 0x65, 0x6e, + 0x42, 0xac, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x09, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, + 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, + 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, + 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/elys/perpetual/query.pulsar.go b/api/elys/perpetual/query.pulsar.go index d615c5360..f6b35160e 100644 --- a/api/elys/perpetual/query.pulsar.go +++ b/api/elys/perpetual/query.pulsar.go @@ -5173,16 +5173,14 @@ func (x *fastReflection_PerpetualCounterResponse) ProtoMethods() *protoiface.Met } var ( - md_PositionsForAddressRequest protoreflect.MessageDescriptor - fd_PositionsForAddressRequest_address protoreflect.FieldDescriptor - fd_PositionsForAddressRequest_pagination protoreflect.FieldDescriptor + md_PositionsForAddressRequest protoreflect.MessageDescriptor + fd_PositionsForAddressRequest_address protoreflect.FieldDescriptor ) func init() { file_elys_perpetual_query_proto_init() md_PositionsForAddressRequest = File_elys_perpetual_query_proto.Messages().ByName("PositionsForAddressRequest") fd_PositionsForAddressRequest_address = md_PositionsForAddressRequest.Fields().ByName("address") - fd_PositionsForAddressRequest_pagination = md_PositionsForAddressRequest.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_PositionsForAddressRequest)(nil) @@ -5256,12 +5254,6 @@ func (x *fastReflection_PositionsForAddressRequest) Range(f func(protoreflect.Fi return } } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_PositionsForAddressRequest_pagination, value) { - return - } - } } // Has reports whether a field is populated. @@ -5279,8 +5271,6 @@ func (x *fastReflection_PositionsForAddressRequest) Has(fd protoreflect.FieldDes switch fd.FullName() { case "elys.perpetual.PositionsForAddressRequest.address": return x.Address != "" - case "elys.perpetual.PositionsForAddressRequest.pagination": - return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressRequest")) @@ -5299,8 +5289,6 @@ func (x *fastReflection_PositionsForAddressRequest) Clear(fd protoreflect.FieldD switch fd.FullName() { case "elys.perpetual.PositionsForAddressRequest.address": x.Address = "" - case "elys.perpetual.PositionsForAddressRequest.pagination": - x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressRequest")) @@ -5320,9 +5308,6 @@ func (x *fastReflection_PositionsForAddressRequest) Get(descriptor protoreflect. case "elys.perpetual.PositionsForAddressRequest.address": value := x.Address return protoreflect.ValueOfString(value) - case "elys.perpetual.PositionsForAddressRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressRequest")) @@ -5345,8 +5330,6 @@ func (x *fastReflection_PositionsForAddressRequest) Set(fd protoreflect.FieldDes switch fd.FullName() { case "elys.perpetual.PositionsForAddressRequest.address": x.Address = value.Interface().(string) - case "elys.perpetual.PositionsForAddressRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageRequest) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressRequest")) @@ -5367,11 +5350,6 @@ func (x *fastReflection_PositionsForAddressRequest) Set(fd protoreflect.FieldDes // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PositionsForAddressRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "elys.perpetual.PositionsForAddressRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "elys.perpetual.PositionsForAddressRequest.address": panic(fmt.Errorf("field address of message elys.perpetual.PositionsForAddressRequest is not mutable")) default: @@ -5389,9 +5367,6 @@ func (x *fastReflection_PositionsForAddressRequest) NewField(fd protoreflect.Fie switch fd.FullName() { case "elys.perpetual.PositionsForAddressRequest.address": return protoreflect.ValueOfString("") - case "elys.perpetual.PositionsForAddressRequest.pagination": - m := new(v1beta11.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressRequest")) @@ -5465,10 +5440,6 @@ func (x *fastReflection_PositionsForAddressRequest) ProtoMethods() *protoiface.M if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5498,20 +5469,6 @@ func (x *fastReflection_PositionsForAddressRequest) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) @@ -5600,42 +5557,6 @@ func (x *fastReflection_PositionsForAddressRequest) ProtoMethods() *protoiface.M } x.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5723,16 +5644,14 @@ func (x *_PositionsForAddressResponse_1_list) IsValid() bool { } var ( - md_PositionsForAddressResponse protoreflect.MessageDescriptor - fd_PositionsForAddressResponse_mtps protoreflect.FieldDescriptor - fd_PositionsForAddressResponse_pagination protoreflect.FieldDescriptor + md_PositionsForAddressResponse protoreflect.MessageDescriptor + fd_PositionsForAddressResponse_mtps protoreflect.FieldDescriptor ) func init() { file_elys_perpetual_query_proto_init() md_PositionsForAddressResponse = File_elys_perpetual_query_proto.Messages().ByName("PositionsForAddressResponse") fd_PositionsForAddressResponse_mtps = md_PositionsForAddressResponse.Fields().ByName("mtps") - fd_PositionsForAddressResponse_pagination = md_PositionsForAddressResponse.Fields().ByName("pagination") } var _ protoreflect.Message = (*fastReflection_PositionsForAddressResponse)(nil) @@ -5806,12 +5725,6 @@ func (x *fastReflection_PositionsForAddressResponse) Range(f func(protoreflect.F return } } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_PositionsForAddressResponse_pagination, value) { - return - } - } } // Has reports whether a field is populated. @@ -5829,8 +5742,6 @@ func (x *fastReflection_PositionsForAddressResponse) Has(fd protoreflect.FieldDe switch fd.FullName() { case "elys.perpetual.PositionsForAddressResponse.mtps": return len(x.Mtps) != 0 - case "elys.perpetual.PositionsForAddressResponse.pagination": - return x.Pagination != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressResponse")) @@ -5849,8 +5760,6 @@ func (x *fastReflection_PositionsForAddressResponse) Clear(fd protoreflect.Field switch fd.FullName() { case "elys.perpetual.PositionsForAddressResponse.mtps": x.Mtps = nil - case "elys.perpetual.PositionsForAddressResponse.pagination": - x.Pagination = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressResponse")) @@ -5873,9 +5782,6 @@ func (x *fastReflection_PositionsForAddressResponse) Get(descriptor protoreflect } listValue := &_PositionsForAddressResponse_1_list{list: &x.Mtps} return protoreflect.ValueOfList(listValue) - case "elys.perpetual.PositionsForAddressResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressResponse")) @@ -5900,8 +5806,6 @@ func (x *fastReflection_PositionsForAddressResponse) Set(fd protoreflect.FieldDe lv := value.List() clv := lv.(*_PositionsForAddressResponse_1_list) x.Mtps = *clv.list - case "elys.perpetual.PositionsForAddressResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta11.PageResponse) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressResponse")) @@ -5928,11 +5832,6 @@ func (x *fastReflection_PositionsForAddressResponse) Mutable(fd protoreflect.Fie } value := &_PositionsForAddressResponse_1_list{list: &x.Mtps} return protoreflect.ValueOfList(value) - case "elys.perpetual.PositionsForAddressResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta11.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressResponse")) @@ -5949,9 +5848,6 @@ func (x *fastReflection_PositionsForAddressResponse) NewField(fd protoreflect.Fi case "elys.perpetual.PositionsForAddressResponse.mtps": list := []*MtpAndPrice{} return protoreflect.ValueOfList(&_PositionsForAddressResponse_1_list{list: &list}) - case "elys.perpetual.PositionsForAddressResponse.pagination": - m := new(v1beta11.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.PositionsForAddressResponse")) @@ -6027,10 +5923,6 @@ func (x *fastReflection_PositionsForAddressResponse) ProtoMethods() *protoiface. n += 1 + l + runtime.Sov(uint64(l)) } } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6060,20 +5952,6 @@ func (x *fastReflection_PositionsForAddressResponse) ProtoMethods() *protoiface. i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } if len(x.Mtps) > 0 { for iNdEx := len(x.Mtps) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.Mtps[iNdEx]) @@ -6173,42 +6051,6 @@ func (x *fastReflection_PositionsForAddressResponse) ProtoMethods() *protoiface. return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { - x.Pagination = &v1beta11.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -19836,8 +19678,7 @@ type PositionsForAddressRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Pagination *v1beta11.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } func (x *PositionsForAddressRequest) Reset() { @@ -19867,20 +19708,12 @@ func (x *PositionsForAddressRequest) GetAddress() string { return "" } -func (x *PositionsForAddressRequest) GetPagination() *v1beta11.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - type PositionsForAddressResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Mtps []*MtpAndPrice `protobuf:"bytes,1,rep,name=mtps,proto3" json:"mtps,omitempty"` - Pagination *v1beta11.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Mtps []*MtpAndPrice `protobuf:"bytes,1,rep,name=mtps,proto3" json:"mtps,omitempty"` } func (x *PositionsForAddressResponse) Reset() { @@ -19910,13 +19743,6 @@ func (x *PositionsForAddressResponse) GetMtps() []*MtpAndPrice { return nil } -func (x *PositionsForAddressResponse) GetPagination() *v1beta11.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - type WhitelistRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -21333,652 +21159,642 @@ var file_elys_perpetual_query_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x7e, 0x0a, 0x1a, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x36, 0x0a, 0x1a, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1b, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6d, 0x74, 0x70, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x74, 0x70, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x52, 0x04, 0x6d, 0x74, 0x70, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x5a, 0x0a, 0x10, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x11, - 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4e, + 0x0a, 0x1b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, + 0x04, 0x6d, 0x74, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6c, + 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x74, 0x70, + 0x41, 0x6e, 0x64, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x04, 0x6d, 0x74, 0x70, 0x73, 0x22, 0x5a, + 0x0a, 0x10, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x11, 0x57, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x47, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x14, 0x49, 0x73, 0x57, 0x68, 0x69, 0x74, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x58, 0x0a, 0x15, 0x49, 0x73, 0x57, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x69, + 0x73, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, + 0x4e, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x22, + 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, + 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x6f, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x14, 0x49, 0x73, 0x57, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x58, 0x0a, 0x15, 0x49, 0x73, - 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, - 0x0e, 0x69, 0x73, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, - 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x22, 0x4e, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6f, 0x6f, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6f, - 0x6c, 0x22, 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x6f, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x97, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x6f, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6f, 0x6f, - 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6f, - 0x6c, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x0a, 0x4d, 0x54, - 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x22, 0x3c, 0x0a, 0x0b, 0x4d, - 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x74, - 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x74, 0x70, 0x41, 0x6e, 0x64, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x52, 0x03, 0x6d, 0x74, 0x70, 0x22, 0xc7, 0x03, 0x0a, 0x1a, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, - 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, - 0x0a, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, - 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x61, 0x6b, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x0a, 0x4d, 0x54, 0x50, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x22, 0x3c, 0x0a, 0x0b, 0x4d, 0x54, 0x50, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x74, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x74, 0x70, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x52, 0x03, 0x6d, 0x74, 0x70, 0x22, 0xc7, 0x03, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, + 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x08, + 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x63, + 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x52, 0x0a, + 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x22, 0xa6, 0x0d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, + 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x12, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, - 0x52, 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x22, 0xa6, 0x0d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, - 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, - 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x12, 0x65, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x72, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x3f, + 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, + 0x63, 0x0a, 0x14, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x12, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, + 0x52, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x6f, 0x70, + 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x11, + 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x6c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x65, + 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6e, + 0x6c, 0x12, 0x50, 0x0a, 0x13, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, - 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, - 0x6c, 0x12, 0x63, 0x0a, 0x14, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x12, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, - 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x50, 0x0a, 0x0a, - 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x63, 0x0a, 0x14, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x5d, - 0x0a, 0x11, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x74, 0x61, - 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, - 0x11, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, - 0x0d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x0a, + 0x44, 0x65, 0x63, 0x52, 0x12, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, + 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x70, + 0x61, 0x63, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, - 0x50, 0x6e, 0x6c, 0x12, 0x50, 0x0a, 0x13, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, - 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, 0x73, 0x6c, 0x69, 0x70, - 0x70, 0x61, 0x67, 0x65, 0x12, 0x63, 0x0a, 0x14, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x12, 0x41, + 0x0a, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x13, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, + 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x66, 0x75, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x54, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, - 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, - 0x12, 0x41, 0x0a, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x13, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x13, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, - 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x73, 0x77, - 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, + 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, + 0x73, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0a, 0x74, 0x61, 0x6b, 0x65, + 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x09, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x22, 0xb1, 0x0a, 0x0a, 0x0c, 0x50, + 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x61, + 0x6d, 0x6d, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x61, 0x6d, 0x6d, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x72, 0x0a, 0x1c, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x52, 0x19, 0x62, 0x61, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, + 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, + 0x74, 0x0a, 0x1d, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, + 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x71, 0x75, 0x6f, 0x74, 0x65, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x63, 0x0a, 0x14, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x10, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x70, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x11, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x0f, 0x70, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x53, 0x68, 0x6f, + 0x72, 0x74, 0x12, 0x57, 0x0a, 0x29, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, + 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x24, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0c, 0x66, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, + 0x65, 0x12, 0x57, 0x0a, 0x11, 0x6e, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x09, 0x6c, 0x6f, + 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0a, 0x74, 0x61, - 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 0x52, 0x08, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x09, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x22, 0xb1, 0x0a, 0x0a, - 0x0c, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, - 0x0b, 0x61, 0x6d, 0x6d, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x61, 0x6d, 0x6d, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x72, 0x0a, - 0x1c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x19, 0x62, 0x61, 0x73, 0x65, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x61, 0x74, 0x69, - 0x6f, 0x12, 0x74, 0x0a, 0x1d, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x63, 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x11, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4c, + 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x18, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x4c, 0x6f, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, + 0x12, 0x66, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, + 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, + 0x52, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, 0x65, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x22, 0xc1, + 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, + 0x73, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6c, + 0x6f, 0x73, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, + 0x49, 0x64, 0x22, 0xf6, 0x08, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x6f, 0x73, + 0x65, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0d, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x41, 0x0a, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x61, + 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x71, 0x75, 0x6f, - 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x63, 0x0a, 0x14, 0x62, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x10, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x70, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x11, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x70, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x53, - 0x68, 0x6f, 0x72, 0x74, 0x12, 0x57, 0x0a, 0x29, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x24, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, - 0x74, 0x52, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x12, 0x54, 0x0a, - 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x5e, 0x0a, 0x11, 0x6c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, - 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x11, 0x6e, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x65, 0x74, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x09, - 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x08, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0a, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x4c, - 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, + 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, + 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, + 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x68, 0x0a, 0x20, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x5f, 0x75, 0x6e, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x18, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, - 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, - 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x15, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x4c, 0x6f, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, - 0x73, 0x74, 0x12, 0x66, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x72, - 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x74, 0x52, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x0c, 0x6c, 0x65, - 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x78, - 0x22, 0xc1, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x45, - 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x0c, 0x63, - 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0b, - 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, - 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, - 0x6f, 0x6c, 0x49, 0x64, 0x22, 0xf6, 0x08, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x0d, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6d, - 0x70, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x5e, 0x0a, 0x11, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x6d, 0x61, - 0x78, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, - 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x68, 0x0a, 0x20, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x6e, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6c, 0x69, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x1d, 0x62, 0x6f, - 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x55, 0x6e, 0x70, 0x61, - 0x69, 0x64, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x4a, 0x0a, 0x10, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x69, 0x6e, - 0x67, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x12, 0x70, 0x61, 0x79, 0x69, 0x6e, - 0x67, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x1d, 0x62, 0x6f, 0x72, 0x72, + 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x55, 0x6e, 0x70, 0x61, 0x69, 0x64, + 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x4a, 0x0a, 0x10, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x70, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x73, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, - 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x39, 0x0a, 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x61, 0x0a, 0x13, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, - 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x12, 0x4d, - 0x0a, 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x22, 0xa8, 0x03, - 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, - 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x08, 0x6c, 0x65, 0x76, - 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, - 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x12, 0x70, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x5f, + 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x11, 0x70, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a, + 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x29, 0x0a, - 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, - 0x72, 0x61, 0x6c, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x88, 0x0d, 0x0a, 0x22, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x12, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4c, - 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x63, 0x0a, 0x14, 0x68, 0x6f, 0x75, 0x72, - 0x6c, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x07, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, + 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x61, 0x0a, 0x13, 0x77, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x68, 0x6f, 0x75, 0x72, 0x6c, - 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, - 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x10, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x70, 0x6e, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x65, 0x73, - 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x50, 0x0a, 0x13, 0x61, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x08, - 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x12, 0x4d, 0x0a, 0x08, + 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x12, 0x63, 0x0a, 0x14, 0x62, - 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, - 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, + 0x63, 0x52, 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x22, 0xa8, 0x03, 0x0a, 0x21, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x62, 0x6f, - 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, - 0x12, 0x54, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, - 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, - 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x39, 0x0a, 0x07, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x12, 0x41, 0x0a, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, 0x6c, 0x65, + 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, - 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x66, + 0x69, 0x6e, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x61, - 0x0a, 0x13, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, - 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x13, + 0x65, 0x63, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, + 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x88, 0x0d, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, + 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x12, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x11, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x65, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x63, 0x0a, 0x14, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, - 0x73, 0x12, 0x50, 0x0a, 0x0a, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x68, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, - 0x65, 0x65, 0x73, 0x32, 0x81, 0x10, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x74, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, - 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, - 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x10, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x70, 0x6e, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x65, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6e, 0x6c, 0x12, 0x50, 0x0a, 0x13, 0x61, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x08, 0x73, 0x6c, + 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x08, 0x73, 0x6c, 0x69, 0x70, 0x70, 0x61, 0x67, 0x65, 0x12, 0x63, 0x0a, 0x14, 0x62, 0x6f, 0x72, + 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, + 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x62, 0x6f, 0x72, 0x72, + 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x12, 0x54, + 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6d, + 0x70, 0x61, 0x63, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x64, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x64, 0x79, 0x12, 0x41, 0x0a, 0x0b, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x13, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x12, + 0x4e, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x73, 0x12, + 0x50, 0x0a, 0x0a, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, + 0x73, 0x32, 0xf0, 0x0f, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x74, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x65, + 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, + 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, + 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x39, 0x12, 0x37, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6f, - 0x6c, 0x12, 0x26, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x65, 0x6c, 0x79, 0x73, - 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x12, 0x48, 0x2f, 0x65, 0x6c, 0x79, - 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6d, 0x74, 0x70, 0x73, 0x2d, 0x62, 0x79, - 0x2d, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x7b, 0x61, 0x6d, 0x6d, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x65, 0x6c, 0x79, 0x73, - 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, - 0xc3, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x46, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x2e, 0x65, 0x6c, 0x79, - 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x46, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x12, 0x48, 0x2f, 0x65, 0x6c, - 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6d, 0x74, 0x70, 0x73, 0x2d, 0x66, - 0x6f, 0x72, 0x2d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x68, 0x69, - 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, - 0x6c, 0x2f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x7b, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x91, 0x01, 0x0a, - 0x0d, 0x49, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x12, 0x24, - 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, - 0x49, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x49, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, - 0x6c, 0x2f, 0x69, 0x73, 0x2d, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, - 0x12, 0x84, 0x01, 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x23, 0x2e, 0x65, 0x6c, 0x79, 0x73, - 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, + 0x37, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, + 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x12, + 0x26, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6f, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x12, 0x48, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6d, 0x74, 0x70, 0x73, 0x2d, 0x62, 0x79, 0x2d, 0x70, + 0x6f, 0x6f, 0x6c, 0x2f, 0x7b, 0x61, 0x6d, 0x6d, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, + 0x79, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, + 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, + 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x65, 0x6c, 0x79, 0x73, + 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6d, 0x74, 0x70, 0x73, 0x2d, 0x66, 0x6f, 0x72, + 0x2d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, + 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, + 0x12, 0x37, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x77, + 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x49, 0x73, + 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x12, 0x24, 0x2e, 0x65, 0x6c, + 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x49, 0x73, 0x57, + 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x2e, 0x49, 0x73, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x12, 0x2b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x69, + 0x73, 0x2d, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x12, 0x84, 0x01, + 0x0a, 0x04, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x23, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6c, + 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x65, 0x6c, 0x79, 0x73, + 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x7b, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x65, - 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, - 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, - 0x7b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x6f, 0x6c, - 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x6f, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x77, 0x0a, 0x03, 0x4d, 0x54, 0x50, 0x12, - 0x1a, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0x2e, 0x4d, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x65, 0x6c, - 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x54, 0x50, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, - 0x12, 0x2f, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, - 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6d, - 0x74, 0x70, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, - 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, - 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0xb1, 0x01, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x45, 0x73, 0x74, - 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x6f, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x34, 0x12, 0x32, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, + 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x77, 0x0a, 0x03, 0x4d, 0x54, 0x50, 0x12, 0x1a, 0x2e, 0x65, + 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x54, + 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, + 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x54, 0x50, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, + 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, + 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6d, 0x74, 0x70, 0x2f, + 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9f, + 0x01, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2a, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0xb1, 0x01, 0x0a, 0x0f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x65, 0x6c, 0x79, - 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x2d, 0x65, - 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x15, 0x4f, 0x70, 0x65, 0x6e, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, - 0x6c, 0x12, 0x31, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x2d, 0x65, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x15, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x12, 0x31, + 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, 0x73, 0x74, 0x69, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x65, 0x6e, 0x45, - 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, - 0x12, 0x35, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, - 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6f, - 0x70, 0x65, 0x6e, 0x2d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x62, - 0x79, 0x2d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x42, 0xad, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, - 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, - 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, + 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, + 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x6f, 0x70, 0x65, 0x6e, + 0x2d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x62, 0x79, 0x2d, 0x66, + 0x69, 0x6e, 0x61, 0x6c, 0x42, 0xad, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, + 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, + 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xa2, 0x02, 0x03, + 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -22045,76 +21861,74 @@ var file_elys_perpetual_query_proto_depIdxs = []int32{ 1, // 8: elys.perpetual.PositionsByPoolResponse.mtps:type_name -> elys.perpetual.MtpAndPrice 33, // 9: elys.perpetual.PositionsByPoolResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse 34, // 10: elys.perpetual.PerpetualCounterResponse.result:type_name -> elys.perpetual.PerpetualCounter - 32, // 11: elys.perpetual.PositionsForAddressRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 1, // 12: elys.perpetual.PositionsForAddressResponse.mtps:type_name -> elys.perpetual.MtpAndPrice - 33, // 13: elys.perpetual.PositionsForAddressResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 32, // 14: elys.perpetual.WhitelistRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 33, // 15: elys.perpetual.WhitelistResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 24, // 16: elys.perpetual.QueryGetPoolResponse.pool:type_name -> elys.perpetual.PoolResponse - 32, // 17: elys.perpetual.QueryAllPoolRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 24, // 18: elys.perpetual.QueryAllPoolResponse.pool:type_name -> elys.perpetual.PoolResponse - 33, // 19: elys.perpetual.QueryAllPoolResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 1, // 20: elys.perpetual.MTPResponse.mtp:type_name -> elys.perpetual.MtpAndPrice - 35, // 21: elys.perpetual.QueryOpenEstimationRequest.position:type_name -> elys.perpetual.Position - 30, // 22: elys.perpetual.QueryOpenEstimationRequest.collateral:type_name -> cosmos.base.v1beta1.Coin - 35, // 23: elys.perpetual.QueryOpenEstimationResponse.position:type_name -> elys.perpetual.Position - 30, // 24: elys.perpetual.QueryOpenEstimationResponse.collateral:type_name -> cosmos.base.v1beta1.Coin - 30, // 25: elys.perpetual.QueryOpenEstimationResponse.position_size:type_name -> cosmos.base.v1beta1.Coin - 30, // 26: elys.perpetual.QueryOpenEstimationResponse.estimated_pnl:type_name -> cosmos.base.v1beta1.Coin - 30, // 27: elys.perpetual.QueryOpenEstimationResponse.available_liquidity:type_name -> cosmos.base.v1beta1.Coin - 30, // 28: elys.perpetual.QueryOpenEstimationResponse.custody:type_name -> cosmos.base.v1beta1.Coin - 30, // 29: elys.perpetual.QueryOpenEstimationResponse.liabilities:type_name -> cosmos.base.v1beta1.Coin - 36, // 30: elys.perpetual.PoolResponse.pool_assets_long:type_name -> elys.perpetual.PoolAsset - 36, // 31: elys.perpetual.PoolResponse.pool_assets_short:type_name -> elys.perpetual.PoolAsset - 30, // 32: elys.perpetual.PoolResponse.total_liabilities:type_name -> cosmos.base.v1beta1.Coin - 35, // 33: elys.perpetual.QueryCloseEstimationResponse.position:type_name -> elys.perpetual.Position - 30, // 34: elys.perpetual.QueryCloseEstimationResponse.position_size:type_name -> cosmos.base.v1beta1.Coin - 30, // 35: elys.perpetual.QueryCloseEstimationResponse.liabilities:type_name -> cosmos.base.v1beta1.Coin - 30, // 36: elys.perpetual.QueryCloseEstimationResponse.borrow_interest_unpaid_liability:type_name -> cosmos.base.v1beta1.Coin - 30, // 37: elys.perpetual.QueryCloseEstimationResponse.returning_amount:type_name -> cosmos.base.v1beta1.Coin - 30, // 38: elys.perpetual.QueryCloseEstimationResponse.paying_liabilities:type_name -> cosmos.base.v1beta1.Coin - 30, // 39: elys.perpetual.QueryCloseEstimationResponse.custody:type_name -> cosmos.base.v1beta1.Coin - 30, // 40: elys.perpetual.QueryCloseEstimationResponse.collateral:type_name -> cosmos.base.v1beta1.Coin - 35, // 41: elys.perpetual.QueryOpenEstimationByFinalRequest.position:type_name -> elys.perpetual.Position - 30, // 42: elys.perpetual.QueryOpenEstimationByFinalRequest.final_amount:type_name -> cosmos.base.v1beta1.Coin - 35, // 43: elys.perpetual.QueryOpenEstimationByFinalResponse.position:type_name -> elys.perpetual.Position - 30, // 44: elys.perpetual.QueryOpenEstimationByFinalResponse.collateral:type_name -> cosmos.base.v1beta1.Coin - 30, // 45: elys.perpetual.QueryOpenEstimationByFinalResponse.position_size:type_name -> cosmos.base.v1beta1.Coin - 30, // 46: elys.perpetual.QueryOpenEstimationByFinalResponse.estimated_pnl:type_name -> cosmos.base.v1beta1.Coin - 30, // 47: elys.perpetual.QueryOpenEstimationByFinalResponse.available_liquidity:type_name -> cosmos.base.v1beta1.Coin - 30, // 48: elys.perpetual.QueryOpenEstimationByFinalResponse.custody:type_name -> cosmos.base.v1beta1.Coin - 30, // 49: elys.perpetual.QueryOpenEstimationByFinalResponse.liabilities:type_name -> cosmos.base.v1beta1.Coin - 2, // 50: elys.perpetual.Query.Params:input_type -> elys.perpetual.ParamsRequest - 4, // 51: elys.perpetual.Query.GetPositions:input_type -> elys.perpetual.PositionsRequest - 6, // 52: elys.perpetual.Query.GetPositionsByPool:input_type -> elys.perpetual.PositionsByPoolRequest - 8, // 53: elys.perpetual.Query.PerpetualCounter:input_type -> elys.perpetual.PerpetualCounterRequest - 10, // 54: elys.perpetual.Query.GetPositionsForAddress:input_type -> elys.perpetual.PositionsForAddressRequest - 12, // 55: elys.perpetual.Query.GetWhitelist:input_type -> elys.perpetual.WhitelistRequest - 14, // 56: elys.perpetual.Query.IsWhitelisted:input_type -> elys.perpetual.IsWhitelistedRequest - 16, // 57: elys.perpetual.Query.Pool:input_type -> elys.perpetual.QueryGetPoolRequest - 18, // 58: elys.perpetual.Query.Pools:input_type -> elys.perpetual.QueryAllPoolRequest - 20, // 59: elys.perpetual.Query.MTP:input_type -> elys.perpetual.MTPRequest - 22, // 60: elys.perpetual.Query.OpenEstimation:input_type -> elys.perpetual.QueryOpenEstimationRequest - 25, // 61: elys.perpetual.Query.CloseEstimation:input_type -> elys.perpetual.QueryCloseEstimationRequest - 27, // 62: elys.perpetual.Query.OpenEstimationByFinal:input_type -> elys.perpetual.QueryOpenEstimationByFinalRequest - 3, // 63: elys.perpetual.Query.Params:output_type -> elys.perpetual.ParamsResponse - 5, // 64: elys.perpetual.Query.GetPositions:output_type -> elys.perpetual.PositionsResponse - 7, // 65: elys.perpetual.Query.GetPositionsByPool:output_type -> elys.perpetual.PositionsByPoolResponse - 9, // 66: elys.perpetual.Query.PerpetualCounter:output_type -> elys.perpetual.PerpetualCounterResponse - 11, // 67: elys.perpetual.Query.GetPositionsForAddress:output_type -> elys.perpetual.PositionsForAddressResponse - 13, // 68: elys.perpetual.Query.GetWhitelist:output_type -> elys.perpetual.WhitelistResponse - 15, // 69: elys.perpetual.Query.IsWhitelisted:output_type -> elys.perpetual.IsWhitelistedResponse - 17, // 70: elys.perpetual.Query.Pool:output_type -> elys.perpetual.QueryGetPoolResponse - 19, // 71: elys.perpetual.Query.Pools:output_type -> elys.perpetual.QueryAllPoolResponse - 21, // 72: elys.perpetual.Query.MTP:output_type -> elys.perpetual.MTPResponse - 23, // 73: elys.perpetual.Query.OpenEstimation:output_type -> elys.perpetual.QueryOpenEstimationResponse - 26, // 74: elys.perpetual.Query.CloseEstimation:output_type -> elys.perpetual.QueryCloseEstimationResponse - 28, // 75: elys.perpetual.Query.OpenEstimationByFinal:output_type -> elys.perpetual.QueryOpenEstimationByFinalResponse - 63, // [63:76] is the sub-list for method output_type - 50, // [50:63] is the sub-list for method input_type - 50, // [50:50] is the sub-list for extension type_name - 50, // [50:50] is the sub-list for extension extendee - 0, // [0:50] is the sub-list for field type_name + 1, // 11: elys.perpetual.PositionsForAddressResponse.mtps:type_name -> elys.perpetual.MtpAndPrice + 32, // 12: elys.perpetual.WhitelistRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 33, // 13: elys.perpetual.WhitelistResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 24, // 14: elys.perpetual.QueryGetPoolResponse.pool:type_name -> elys.perpetual.PoolResponse + 32, // 15: elys.perpetual.QueryAllPoolRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 16: elys.perpetual.QueryAllPoolResponse.pool:type_name -> elys.perpetual.PoolResponse + 33, // 17: elys.perpetual.QueryAllPoolResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 1, // 18: elys.perpetual.MTPResponse.mtp:type_name -> elys.perpetual.MtpAndPrice + 35, // 19: elys.perpetual.QueryOpenEstimationRequest.position:type_name -> elys.perpetual.Position + 30, // 20: elys.perpetual.QueryOpenEstimationRequest.collateral:type_name -> cosmos.base.v1beta1.Coin + 35, // 21: elys.perpetual.QueryOpenEstimationResponse.position:type_name -> elys.perpetual.Position + 30, // 22: elys.perpetual.QueryOpenEstimationResponse.collateral:type_name -> cosmos.base.v1beta1.Coin + 30, // 23: elys.perpetual.QueryOpenEstimationResponse.position_size:type_name -> cosmos.base.v1beta1.Coin + 30, // 24: elys.perpetual.QueryOpenEstimationResponse.estimated_pnl:type_name -> cosmos.base.v1beta1.Coin + 30, // 25: elys.perpetual.QueryOpenEstimationResponse.available_liquidity:type_name -> cosmos.base.v1beta1.Coin + 30, // 26: elys.perpetual.QueryOpenEstimationResponse.custody:type_name -> cosmos.base.v1beta1.Coin + 30, // 27: elys.perpetual.QueryOpenEstimationResponse.liabilities:type_name -> cosmos.base.v1beta1.Coin + 36, // 28: elys.perpetual.PoolResponse.pool_assets_long:type_name -> elys.perpetual.PoolAsset + 36, // 29: elys.perpetual.PoolResponse.pool_assets_short:type_name -> elys.perpetual.PoolAsset + 30, // 30: elys.perpetual.PoolResponse.total_liabilities:type_name -> cosmos.base.v1beta1.Coin + 35, // 31: elys.perpetual.QueryCloseEstimationResponse.position:type_name -> elys.perpetual.Position + 30, // 32: elys.perpetual.QueryCloseEstimationResponse.position_size:type_name -> cosmos.base.v1beta1.Coin + 30, // 33: elys.perpetual.QueryCloseEstimationResponse.liabilities:type_name -> cosmos.base.v1beta1.Coin + 30, // 34: elys.perpetual.QueryCloseEstimationResponse.borrow_interest_unpaid_liability:type_name -> cosmos.base.v1beta1.Coin + 30, // 35: elys.perpetual.QueryCloseEstimationResponse.returning_amount:type_name -> cosmos.base.v1beta1.Coin + 30, // 36: elys.perpetual.QueryCloseEstimationResponse.paying_liabilities:type_name -> cosmos.base.v1beta1.Coin + 30, // 37: elys.perpetual.QueryCloseEstimationResponse.custody:type_name -> cosmos.base.v1beta1.Coin + 30, // 38: elys.perpetual.QueryCloseEstimationResponse.collateral:type_name -> cosmos.base.v1beta1.Coin + 35, // 39: elys.perpetual.QueryOpenEstimationByFinalRequest.position:type_name -> elys.perpetual.Position + 30, // 40: elys.perpetual.QueryOpenEstimationByFinalRequest.final_amount:type_name -> cosmos.base.v1beta1.Coin + 35, // 41: elys.perpetual.QueryOpenEstimationByFinalResponse.position:type_name -> elys.perpetual.Position + 30, // 42: elys.perpetual.QueryOpenEstimationByFinalResponse.collateral:type_name -> cosmos.base.v1beta1.Coin + 30, // 43: elys.perpetual.QueryOpenEstimationByFinalResponse.position_size:type_name -> cosmos.base.v1beta1.Coin + 30, // 44: elys.perpetual.QueryOpenEstimationByFinalResponse.estimated_pnl:type_name -> cosmos.base.v1beta1.Coin + 30, // 45: elys.perpetual.QueryOpenEstimationByFinalResponse.available_liquidity:type_name -> cosmos.base.v1beta1.Coin + 30, // 46: elys.perpetual.QueryOpenEstimationByFinalResponse.custody:type_name -> cosmos.base.v1beta1.Coin + 30, // 47: elys.perpetual.QueryOpenEstimationByFinalResponse.liabilities:type_name -> cosmos.base.v1beta1.Coin + 2, // 48: elys.perpetual.Query.Params:input_type -> elys.perpetual.ParamsRequest + 4, // 49: elys.perpetual.Query.GetPositions:input_type -> elys.perpetual.PositionsRequest + 6, // 50: elys.perpetual.Query.GetPositionsByPool:input_type -> elys.perpetual.PositionsByPoolRequest + 8, // 51: elys.perpetual.Query.PerpetualCounter:input_type -> elys.perpetual.PerpetualCounterRequest + 10, // 52: elys.perpetual.Query.GetPositionsForAddress:input_type -> elys.perpetual.PositionsForAddressRequest + 12, // 53: elys.perpetual.Query.GetWhitelist:input_type -> elys.perpetual.WhitelistRequest + 14, // 54: elys.perpetual.Query.IsWhitelisted:input_type -> elys.perpetual.IsWhitelistedRequest + 16, // 55: elys.perpetual.Query.Pool:input_type -> elys.perpetual.QueryGetPoolRequest + 18, // 56: elys.perpetual.Query.Pools:input_type -> elys.perpetual.QueryAllPoolRequest + 20, // 57: elys.perpetual.Query.MTP:input_type -> elys.perpetual.MTPRequest + 22, // 58: elys.perpetual.Query.OpenEstimation:input_type -> elys.perpetual.QueryOpenEstimationRequest + 25, // 59: elys.perpetual.Query.CloseEstimation:input_type -> elys.perpetual.QueryCloseEstimationRequest + 27, // 60: elys.perpetual.Query.OpenEstimationByFinal:input_type -> elys.perpetual.QueryOpenEstimationByFinalRequest + 3, // 61: elys.perpetual.Query.Params:output_type -> elys.perpetual.ParamsResponse + 5, // 62: elys.perpetual.Query.GetPositions:output_type -> elys.perpetual.PositionsResponse + 7, // 63: elys.perpetual.Query.GetPositionsByPool:output_type -> elys.perpetual.PositionsByPoolResponse + 9, // 64: elys.perpetual.Query.PerpetualCounter:output_type -> elys.perpetual.PerpetualCounterResponse + 11, // 65: elys.perpetual.Query.GetPositionsForAddress:output_type -> elys.perpetual.PositionsForAddressResponse + 13, // 66: elys.perpetual.Query.GetWhitelist:output_type -> elys.perpetual.WhitelistResponse + 15, // 67: elys.perpetual.Query.IsWhitelisted:output_type -> elys.perpetual.IsWhitelistedResponse + 17, // 68: elys.perpetual.Query.Pool:output_type -> elys.perpetual.QueryGetPoolResponse + 19, // 69: elys.perpetual.Query.Pools:output_type -> elys.perpetual.QueryAllPoolResponse + 21, // 70: elys.perpetual.Query.MTP:output_type -> elys.perpetual.MTPResponse + 23, // 71: elys.perpetual.Query.OpenEstimation:output_type -> elys.perpetual.QueryOpenEstimationResponse + 26, // 72: elys.perpetual.Query.CloseEstimation:output_type -> elys.perpetual.QueryCloseEstimationResponse + 28, // 73: elys.perpetual.Query.OpenEstimationByFinal:output_type -> elys.perpetual.QueryOpenEstimationByFinalResponse + 61, // [61:74] is the sub-list for method output_type + 48, // [48:61] is the sub-list for method input_type + 48, // [48:48] is the sub-list for extension type_name + 48, // [48:48] is the sub-list for extension extendee + 0, // [0:48] is the sub-list for field type_name } func init() { file_elys_perpetual_query_proto_init() } diff --git a/api/elys/perpetual/tx.pulsar.go b/api/elys/perpetual/tx.pulsar.go index 5d82aba20..96152e80e 100644 --- a/api/elys/perpetual/tx.pulsar.go +++ b/api/elys/perpetual/tx.pulsar.go @@ -1209,11 +1209,12 @@ func (x *fastReflection_MsgOpenResponse) ProtoMethods() *protoiface.Methods { } var ( - md_MsgClose protoreflect.MessageDescriptor - fd_MsgClose_creator protoreflect.FieldDescriptor - fd_MsgClose_id protoreflect.FieldDescriptor - fd_MsgClose_amount protoreflect.FieldDescriptor - fd_MsgClose_pool_id protoreflect.FieldDescriptor + md_MsgClose protoreflect.MessageDescriptor + fd_MsgClose_creator protoreflect.FieldDescriptor + fd_MsgClose_id protoreflect.FieldDescriptor + fd_MsgClose_amount protoreflect.FieldDescriptor + fd_MsgClose_pool_id protoreflect.FieldDescriptor + fd_MsgClose_closing_ratio protoreflect.FieldDescriptor ) func init() { @@ -1223,6 +1224,7 @@ func init() { fd_MsgClose_id = md_MsgClose.Fields().ByName("id") fd_MsgClose_amount = md_MsgClose.Fields().ByName("amount") fd_MsgClose_pool_id = md_MsgClose.Fields().ByName("pool_id") + fd_MsgClose_closing_ratio = md_MsgClose.Fields().ByName("closing_ratio") } var _ protoreflect.Message = (*fastReflection_MsgClose)(nil) @@ -1314,6 +1316,12 @@ func (x *fastReflection_MsgClose) Range(f func(protoreflect.FieldDescriptor, pro return } } + if x.ClosingRatio != "" { + value := protoreflect.ValueOfString(x.ClosingRatio) + if !f(fd_MsgClose_closing_ratio, value) { + return + } + } } // Has reports whether a field is populated. @@ -1337,6 +1345,8 @@ func (x *fastReflection_MsgClose) Has(fd protoreflect.FieldDescriptor) bool { return x.Amount != "" case "elys.perpetual.MsgClose.pool_id": return x.PoolId != uint64(0) + case "elys.perpetual.MsgClose.closing_ratio": + return x.ClosingRatio != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.MsgClose")) @@ -1361,6 +1371,8 @@ func (x *fastReflection_MsgClose) Clear(fd protoreflect.FieldDescriptor) { x.Amount = "" case "elys.perpetual.MsgClose.pool_id": x.PoolId = uint64(0) + case "elys.perpetual.MsgClose.closing_ratio": + x.ClosingRatio = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.MsgClose")) @@ -1389,6 +1401,9 @@ func (x *fastReflection_MsgClose) Get(descriptor protoreflect.FieldDescriptor) p case "elys.perpetual.MsgClose.pool_id": value := x.PoolId return protoreflect.ValueOfUint64(value) + case "elys.perpetual.MsgClose.closing_ratio": + value := x.ClosingRatio + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.MsgClose")) @@ -1417,6 +1432,8 @@ func (x *fastReflection_MsgClose) Set(fd protoreflect.FieldDescriptor, value pro x.Amount = value.Interface().(string) case "elys.perpetual.MsgClose.pool_id": x.PoolId = value.Uint() + case "elys.perpetual.MsgClose.closing_ratio": + x.ClosingRatio = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.MsgClose")) @@ -1445,6 +1462,8 @@ func (x *fastReflection_MsgClose) Mutable(fd protoreflect.FieldDescriptor) proto panic(fmt.Errorf("field amount of message elys.perpetual.MsgClose is not mutable")) case "elys.perpetual.MsgClose.pool_id": panic(fmt.Errorf("field pool_id of message elys.perpetual.MsgClose is not mutable")) + case "elys.perpetual.MsgClose.closing_ratio": + panic(fmt.Errorf("field closing_ratio of message elys.perpetual.MsgClose is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.MsgClose")) @@ -1466,6 +1485,8 @@ func (x *fastReflection_MsgClose) NewField(fd protoreflect.FieldDescriptor) prot return protoreflect.ValueOfString("") case "elys.perpetual.MsgClose.pool_id": return protoreflect.ValueOfUint64(uint64(0)) + case "elys.perpetual.MsgClose.closing_ratio": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.MsgClose")) @@ -1549,6 +1570,10 @@ func (x *fastReflection_MsgClose) ProtoMethods() *protoiface.Methods { if x.PoolId != 0 { n += 1 + runtime.Sov(uint64(x.PoolId)) } + l = len(x.ClosingRatio) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1578,6 +1603,13 @@ func (x *fastReflection_MsgClose) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.ClosingRatio) > 0 { + i -= len(x.ClosingRatio) + copy(dAtA[i:], x.ClosingRatio) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClosingRatio))) + i-- + dAtA[i] = 0x2a + } if x.PoolId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.PoolId)) i-- @@ -1753,6 +1785,38 @@ func (x *fastReflection_MsgClose) ProtoMethods() *protoiface.Methods { break } } + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClosingRatio", 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.ClosingRatio = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -11144,10 +11208,11 @@ type MsgClose struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - PoolId uint64 `protobuf:"varint,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + PoolId uint64 `protobuf:"varint,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + ClosingRatio string `protobuf:"bytes,5,opt,name=closing_ratio,json=closingRatio,proto3" json:"closing_ratio,omitempty"` } func (x *MsgClose) Reset() { @@ -11198,6 +11263,13 @@ func (x *MsgClose) GetPoolId() uint64 { return 0 } +func (x *MsgClose) GetClosingRatio() string { + if x != nil { + return x.ClosingRatio + } + return "" +} + type MsgCloseResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -12008,7 +12080,7 @@ var file_elys_perpetual_tx_proto_rawDesc = []byte{ 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x22, 0x21, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x22, - 0xd1, 0x01, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, + 0xa9, 0x02, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, @@ -12018,237 +12090,243 @@ var file_elys_perpetual_tx_proto_rawDesc = []byte{ 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x3a, 0x23, - 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, - 0x12, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x43, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, - 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa7, 0x01, 0x0a, - 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x70, 0x65, 0x72, - 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2f, 0x0a, 0x13, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, - 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x68, 0x69, - 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x57, 0x68, 0x69, - 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, - 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, - 0x74, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2f, 0x0a, 0x13, 0x77, 0x68, 0x69, - 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xc6, 0x02, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x09, 0x6c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x42, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, - 0x4c, 0x6f, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6c, 0x79, 0x73, - 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0a, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x3a, 0x2c, 0x82, 0xe7, - 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, - 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, - 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x12, 0x32, 0x0a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x47, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, - 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, - 0x6c, 0x49, 0x64, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, - 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf5, - 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x47, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, - 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, - 0x64, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x22, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x1b, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x56, + 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, + 0x67, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x10, 0x4d, + 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x43, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa7, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x4d, 0x73, + 0x67, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0c, 0x6c, - 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, - 0x78, 0x3a, 0x38, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, - 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x25, 0x0a, 0x23, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, - 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, - 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x08, 0x61, 0x64, - 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x70, 0x65, + 0x74, 0x79, 0x12, 0x2f, 0x0a, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x16, + 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x44, 0x65, + 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x2f, 0x0a, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x22, + 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc6, 0x02, 0x0a, 0x11, 0x4d, 0x73, + 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x09, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x6c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x70, + 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6c, + 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x08, 0x73, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x0b, + 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x74, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xe7, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, + 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, + 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, + 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x1f, 0x0a, - 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe4, - 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, - 0x72, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, + 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf5, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x46, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x63, - 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0d, 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, - 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x70, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, - 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0x91, 0x08, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x40, 0x0a, 0x04, 0x4f, 0x70, 0x65, - 0x6e, 0x12, 0x17, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x1a, 0x1f, 0x2e, 0x65, 0x6c, 0x79, - 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x4f, - 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x41, - 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x65, + 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x22, 0x70, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x22, + 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xfe, 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, + 0x6f, 0x6c, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, + 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, + 0x6c, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, + 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, + 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x3a, 0x38, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, + 0x6f, 0x6f, 0x6c, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe8, 0x01, 0x0a, 0x15, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, + 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x04, 0x52, 0x08, 0x61, 0x64, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6f, 0x6f, 0x6c, + 0x73, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x64, + 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x46, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, + 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, + 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, + 0xb0, 0x2a, 0x1a, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x4d, 0x73, 0x67, + 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x22, 0x1a, 0x0a, + 0x18, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x91, 0x08, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x40, 0x0a, 0x04, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x17, 0x2e, 0x65, 0x6c, 0x79, 0x73, + 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x70, + 0x65, 0x6e, 0x1a, 0x1f, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, + 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, + 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, + 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x43, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, + 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, + 0x6f, 0x73, 0x65, 0x1a, 0x20, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, + 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4f, 0x0a, 0x09, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, - 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x1a, 0x28, - 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, - 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, - 0x65, 0x12, 0x18, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x1a, 0x20, 0x2e, 0x65, 0x6c, - 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, - 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, - 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, - 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, - 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x09, 0x57, 0x68, 0x69, 0x74, 0x65, - 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0b, 0x44, 0x65, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5e, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, - 0x73, 0x12, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, - 0x4c, 0x6f, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5e, 0x0a, 0x0e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x29, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, - 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x73, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x1a, 0x30, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, - 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, - 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, - 0x12, 0x2b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, - 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, - 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x33, 0x2e, - 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x25, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, + 0x67, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6c, 0x79, + 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x57, + 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x55, 0x0a, 0x0b, 0x44, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x12, + 0x1e, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x1a, + 0x26, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, + 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x65, + 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0e, 0x43, 0x6c, 0x6f, 0x73, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x65, 0x6c, 0x79, 0x73, + 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, + 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x29, 0x2e, 0x65, + 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x30, 0x2e, 0x65, 0x6c, 0x79, + 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x18, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x2b, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, - 0x2d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, - 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaa, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, - 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, - 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, - 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, - 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, + 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x33, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, + 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x12, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, + 0x12, 0x25, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0x2d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaa, 0x01, + 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, + 0x74, 0x75, 0x61, 0x6c, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, + 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, + 0x75, 0x61, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, + 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, + 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, + 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, + 0x3a, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/elys/perpetual/types.pulsar.go b/api/elys/perpetual/types.pulsar.go index fbaef9a8e..53c37db04 100644 --- a/api/elys/perpetual/types.pulsar.go +++ b/api/elys/perpetual/types.pulsar.go @@ -4034,6 +4034,524 @@ func (x *fastReflection_PositionRequest) ProtoMethods() *protoiface.Methods { } } +var ( + md_ADLCounter protoreflect.MessageDescriptor + fd_ADLCounter_pool_id protoreflect.FieldDescriptor + fd_ADLCounter_counter protoreflect.FieldDescriptor + fd_ADLCounter_next_key protoreflect.FieldDescriptor +) + +func init() { + file_elys_perpetual_types_proto_init() + md_ADLCounter = File_elys_perpetual_types_proto.Messages().ByName("ADLCounter") + fd_ADLCounter_pool_id = md_ADLCounter.Fields().ByName("pool_id") + fd_ADLCounter_counter = md_ADLCounter.Fields().ByName("counter") + fd_ADLCounter_next_key = md_ADLCounter.Fields().ByName("next_key") +} + +var _ protoreflect.Message = (*fastReflection_ADLCounter)(nil) + +type fastReflection_ADLCounter ADLCounter + +func (x *ADLCounter) ProtoReflect() protoreflect.Message { + return (*fastReflection_ADLCounter)(x) +} + +func (x *ADLCounter) slowProtoReflect() protoreflect.Message { + mi := &file_elys_perpetual_types_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ADLCounter_messageType fastReflection_ADLCounter_messageType +var _ protoreflect.MessageType = fastReflection_ADLCounter_messageType{} + +type fastReflection_ADLCounter_messageType struct{} + +func (x fastReflection_ADLCounter_messageType) Zero() protoreflect.Message { + return (*fastReflection_ADLCounter)(nil) +} +func (x fastReflection_ADLCounter_messageType) New() protoreflect.Message { + return new(fastReflection_ADLCounter) +} +func (x fastReflection_ADLCounter_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ADLCounter +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ADLCounter) Descriptor() protoreflect.MessageDescriptor { + return md_ADLCounter +} + +// 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_ADLCounter) Type() protoreflect.MessageType { + return _fastReflection_ADLCounter_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ADLCounter) New() protoreflect.Message { + return new(fastReflection_ADLCounter) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ADLCounter) Interface() protoreflect.ProtoMessage { + return (*ADLCounter)(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_ADLCounter) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PoolId != uint64(0) { + value := protoreflect.ValueOfUint64(x.PoolId) + if !f(fd_ADLCounter_pool_id, value) { + return + } + } + if x.Counter != uint64(0) { + value := protoreflect.ValueOfUint64(x.Counter) + if !f(fd_ADLCounter_counter, value) { + return + } + } + if len(x.NextKey) != 0 { + value := protoreflect.ValueOfBytes(x.NextKey) + if !f(fd_ADLCounter_next_key, 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_ADLCounter) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "elys.perpetual.ADLCounter.pool_id": + return x.PoolId != uint64(0) + case "elys.perpetual.ADLCounter.counter": + return x.Counter != uint64(0) + case "elys.perpetual.ADLCounter.next_key": + return len(x.NextKey) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.ADLCounter")) + } + panic(fmt.Errorf("message elys.perpetual.ADLCounter 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_ADLCounter) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "elys.perpetual.ADLCounter.pool_id": + x.PoolId = uint64(0) + case "elys.perpetual.ADLCounter.counter": + x.Counter = uint64(0) + case "elys.perpetual.ADLCounter.next_key": + x.NextKey = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.ADLCounter")) + } + panic(fmt.Errorf("message elys.perpetual.ADLCounter 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_ADLCounter) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "elys.perpetual.ADLCounter.pool_id": + value := x.PoolId + return protoreflect.ValueOfUint64(value) + case "elys.perpetual.ADLCounter.counter": + value := x.Counter + return protoreflect.ValueOfUint64(value) + case "elys.perpetual.ADLCounter.next_key": + value := x.NextKey + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.ADLCounter")) + } + panic(fmt.Errorf("message elys.perpetual.ADLCounter 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_ADLCounter) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "elys.perpetual.ADLCounter.pool_id": + x.PoolId = value.Uint() + case "elys.perpetual.ADLCounter.counter": + x.Counter = value.Uint() + case "elys.perpetual.ADLCounter.next_key": + x.NextKey = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.ADLCounter")) + } + panic(fmt.Errorf("message elys.perpetual.ADLCounter 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_ADLCounter) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "elys.perpetual.ADLCounter.pool_id": + panic(fmt.Errorf("field pool_id of message elys.perpetual.ADLCounter is not mutable")) + case "elys.perpetual.ADLCounter.counter": + panic(fmt.Errorf("field counter of message elys.perpetual.ADLCounter is not mutable")) + case "elys.perpetual.ADLCounter.next_key": + panic(fmt.Errorf("field next_key of message elys.perpetual.ADLCounter is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.ADLCounter")) + } + panic(fmt.Errorf("message elys.perpetual.ADLCounter 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_ADLCounter) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "elys.perpetual.ADLCounter.pool_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "elys.perpetual.ADLCounter.counter": + return protoreflect.ValueOfUint64(uint64(0)) + case "elys.perpetual.ADLCounter.next_key": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.ADLCounter")) + } + panic(fmt.Errorf("message elys.perpetual.ADLCounter 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_ADLCounter) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in elys.perpetual.ADLCounter", 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_ADLCounter) 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_ADLCounter) 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_ADLCounter) 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_ADLCounter) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ADLCounter) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.PoolId != 0 { + n += 1 + runtime.Sov(uint64(x.PoolId)) + } + if x.Counter != 0 { + n += 1 + runtime.Sov(uint64(x.Counter)) + } + l = len(x.NextKey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ADLCounter) + 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.NextKey) > 0 { + i -= len(x.NextKey) + copy(dAtA[i:], x.NextKey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NextKey))) + i-- + dAtA[i] = 0x1a + } + if x.Counter != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Counter)) + i-- + dAtA[i] = 0x10 + } + if x.PoolId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.PoolId)) + i-- + dAtA[i] = 0x8 + } + 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().(*ADLCounter) + 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: ADLCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ADLCounter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + x.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) + } + x.Counter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Counter |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.NextKey = append(x.NextKey[:0], dAtA[iNdEx:postIndex]...) + if x.NextKey == nil { + x.NextKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -4527,6 +5045,57 @@ func (x *PositionRequest) GetPoolId() uint64 { return 0 } +type ADLCounter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + Counter uint64 `protobuf:"varint,2,opt,name=counter,proto3" json:"counter,omitempty"` + NextKey []byte `protobuf:"bytes,3,opt,name=next_key,json=nextKey,proto3" json:"next_key,omitempty"` +} + +func (x *ADLCounter) Reset() { + *x = ADLCounter{} + if protoimpl.UnsafeEnabled { + mi := &file_elys_perpetual_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ADLCounter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ADLCounter) ProtoMessage() {} + +// Deprecated: Use ADLCounter.ProtoReflect.Descriptor instead. +func (*ADLCounter) Descriptor() ([]byte, []int) { + return file_elys_perpetual_types_proto_rawDescGZIP(), []int{5} +} + +func (x *ADLCounter) GetPoolId() uint64 { + if x != nil { + return x.PoolId + } + return 0 +} + +func (x *ADLCounter) GetCounter() uint64 { + if x != nil { + return x.Counter + } + return 0 +} + +func (x *ADLCounter) GetNextKey() []byte { + if x != nil { + return x.NextKey + } + return nil +} + var File_elys_perpetual_types_proto protoreflect.FileDescriptor var file_elys_perpetual_types_proto_rawDesc = []byte{ @@ -4687,22 +5256,28 @@ var file_elys_perpetual_types_proto_rawDesc = []byte{ 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x2a, 0x30, 0x0a, 0x08, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x4e, 0x47, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x48, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x42, 0xad, 0x01, - 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, - 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, - 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, - 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, - 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, - 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, - 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, - 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x0a, 0x41, + 0x44, 0x4c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x6e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x2a, 0x30, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x53, 0x48, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x42, 0xad, 0x01, 0x0a, 0x12, 0x63, 0x6f, + 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, + 0x61, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, + 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, + 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, + 0x73, 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, + 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -4718,7 +5293,7 @@ func file_elys_perpetual_types_proto_rawDescGZIP() []byte { } var file_elys_perpetual_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_elys_perpetual_types_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_elys_perpetual_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_elys_perpetual_types_proto_goTypes = []interface{}{ (Position)(0), // 0: elys.perpetual.Position (*MTP)(nil), // 1: elys.perpetual.MTP @@ -4726,6 +5301,7 @@ var file_elys_perpetual_types_proto_goTypes = []interface{}{ (*FundingRateBlock)(nil), // 3: elys.perpetual.FundingRateBlock (*WhiteList)(nil), // 4: elys.perpetual.WhiteList (*PositionRequest)(nil), // 5: elys.perpetual.PositionRequest + (*ADLCounter)(nil), // 6: elys.perpetual.ADLCounter } var file_elys_perpetual_types_proto_depIdxs = []int32{ 0, // 0: elys.perpetual.MTP.position:type_name -> elys.perpetual.Position @@ -4802,6 +5378,18 @@ func file_elys_perpetual_types_proto_init() { return nil } } + file_elys_perpetual_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ADLCounter); 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{ @@ -4809,7 +5397,7 @@ func file_elys_perpetual_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_elys_perpetual_types_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/go.mod b/go.mod index ea4f80603..dc1eafac4 100644 --- a/go.mod +++ b/go.mod @@ -53,7 +53,6 @@ require ( github.com/bufbuild/buf v1.31.0 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0 - github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/google/uuid v1.6.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/ojo-network/ojo v0.5.2-0.20250617172149-bc325435c484 diff --git a/go.sum b/go.sum index 04ec311a8..cd3cd81ed 100644 --- a/go.sum +++ b/go.sum @@ -401,8 +401,6 @@ github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.2.0 h1:rM+ github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.2.0/go.mod h1:O5H9Ic3Pe6cmJn1eqlj5N48sLb8WQ1VWmDP4/11g/4E= github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0 h1:RBUq0cC9HJ9iIhifdWbV+kjDExzfhmAB7ktOAU1RWPU= github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0/go.mod h1:6szYOdzw0cUzFj8ZW+qfss0b4mMN1/HWxPATKZKbCfI= -github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 h1:AQO9NIAP3RFqvBCj7IqM/V1LCxmuvcvGUdu0RIEz/c0= -github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0/go.mod h1:/ZpKJSW/SKPkFS7jTqkPVn7kOHUUfRNzu+8aS7YOL8o= github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd h1:Lx+/5dZ/nN6qPXP2Ofog6u1fmlkCFA1ElcOconnofEM= github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd/go.mod h1:JWfpWVKJKiKtd53/KbRoKfxWl8FsT2GPcNezTOk0o5Q= github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI= @@ -1046,8 +1044,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= diff --git a/proto/elys/perpetual/genesis.proto b/proto/elys/perpetual/genesis.proto index 3fc167210..db50e4ac9 100644 --- a/proto/elys/perpetual/genesis.proto +++ b/proto/elys/perpetual/genesis.proto @@ -17,4 +17,5 @@ message GenesisState { repeated string address_whitelist = 4; repeated PerpetualCounter perpetual_counter = 5 [ (gogoproto.nullable) = false ]; + repeated ADLCounter adl_counter = 6 [ (gogoproto.nullable) = false ]; } diff --git a/proto/elys/perpetual/params.proto b/proto/elys/perpetual/params.proto index 17c5a3352..d08c2ddba 100644 --- a/proto/elys/perpetual/params.proto +++ b/proto/elys/perpetual/params.proto @@ -6,108 +6,6 @@ import "cosmos_proto/cosmos.proto"; option go_package = "github.com/elys-network/elys/v6/x/perpetual/types"; -message LegacyParams { - string leverage_max = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string borrow_interest_rate_max = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string borrow_interest_rate_min = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string borrow_interest_rate_increase = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string borrow_interest_rate_decrease = 5 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string health_gain_factor = 6 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - int64 max_open_positions = 7; - string pool_max_liabilities_threshold = 8 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string borrow_interest_payment_fund_percentage = 9 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string legacy_borrow_interest_payment_fund_address = 10; - string safety_factor = 11 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - bool borrow_interest_payment_enabled = 12; - bool whitelisting_enabled = 13; - string perpetual_swap_fee = 14 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - int64 max_limit_order = 15; - string fixed_funding_rate = 16 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // minimum value for take_profit_price/current price for long, should be - // greater than 1 - string minimum_long_take_profit_price_ratio = 17 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // max value for take_profit_price/current price for long, should be greater - // than 1 - string maximum_long_take_profit_price_ratio = 18 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // max value for take_profit_price/current price for short, should be less - // than 1 - string maximum_short_take_profit_price_ratio = 19 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in - // validate message - bool enable_take_profit_custody_liabilities = 20; - // We create this and send this value to estimate swap ONLY when opening and - // closing the position Ideally this value is set to half. When trader open a - // position if they receive a weight balance bonus (which is half of weight - // breaking fee, ideally) then while closing position they are charged weight - // breaking fee. So we just directly apply half weight breaking fee on - // perpetual swaps Question: does each need to have separate value of this - // because PoolParams.WeightRecoveryFeePortion can be different Also, if - // trader has no bonus only fee, then overall we are only applying the fee - // half time - string weight_breaking_fee_factor = 21 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - repeated uint64 enabled_pools = 22; -} - message Params { string leverage_max = 1 [ (cosmos_proto.scalar) = "cosmos.Dec", @@ -222,4 +120,5 @@ message Params { (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + uint64 number_per_block = 24; // Number of positions to process per block } diff --git a/proto/elys/perpetual/pool.proto b/proto/elys/perpetual/pool.proto index 3a13f217c..7960ae06f 100644 --- a/proto/elys/perpetual/pool.proto +++ b/proto/elys/perpetual/pool.proto @@ -127,6 +127,11 @@ message Pool { (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + string adl_trigger_ratio = 11 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; } message PerpetualCounter { diff --git a/proto/elys/perpetual/query.proto b/proto/elys/perpetual/query.proto index d6be0c562..6439fc2a0 100644 --- a/proto/elys/perpetual/query.proto +++ b/proto/elys/perpetual/query.proto @@ -43,8 +43,7 @@ service Query { rpc GetPositionsForAddress(PositionsForAddressRequest) returns (PositionsForAddressResponse) { option (google.api.http).get = - "/elys-network/elys/perpetual/mtps-for-address/{address}/" - "{pagination.key}"; + "/elys-network/elys/perpetual/mtps-for-address/{address}"; } // Queries a list of whitelisted addresses. @@ -181,15 +180,9 @@ message PerpetualCounterResponse { PerpetualCounter result = 1 [ (gogoproto.nullable) = false ]; } -message PositionsForAddressRequest { - string address = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} +message PositionsForAddressRequest { string address = 1; } -message PositionsForAddressResponse { - repeated MtpAndPrice mtps = 1; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} +message PositionsForAddressResponse { repeated MtpAndPrice mtps = 1; } message WhitelistRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; diff --git a/proto/elys/perpetual/tx.proto b/proto/elys/perpetual/tx.proto index ae66c9277..ac9d204c5 100644 --- a/proto/elys/perpetual/tx.proto +++ b/proto/elys/perpetual/tx.proto @@ -67,6 +67,11 @@ message MsgClose { (gogoproto.nullable) = false ]; uint64 pool_id = 4; + string closing_ratio = 5 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; } message MsgCloseResponse { diff --git a/proto/elys/perpetual/types.proto b/proto/elys/perpetual/types.proto index 2cf462d83..e017d863e 100644 --- a/proto/elys/perpetual/types.proto +++ b/proto/elys/perpetual/types.proto @@ -130,4 +130,10 @@ message PositionRequest { string address = 1; uint64 id = 2; uint64 pool_id = 3; +} + +message ADLCounter { + uint64 pool_id = 1; + uint64 counter = 2; + bytes next_key = 3; } \ No newline at end of file diff --git a/x/accountedpool/types/query.pb.go b/x/accountedpool/types/query.pb.go index 1755b6e74..77c3af5fc 100644 --- a/x/accountedpool/types/query.pb.go +++ b/x/accountedpool/types/query.pb.go @@ -356,7 +356,6 @@ func _Query_AccountedPoolAll_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.accountedpool.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/accountedpool/types/tx.pb.go b/x/accountedpool/types/tx.pb.go index 56b9b0b6c..44741ecc3 100644 --- a/x/accountedpool/types/tx.pb.go +++ b/x/accountedpool/types/tx.pb.go @@ -78,7 +78,6 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.accountedpool.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/amm/types/query.pb.go b/x/amm/types/query.pb.go index 1b817dd4a..b05deba9c 100644 --- a/x/amm/types/query.pb.go +++ b/x/amm/types/query.pb.go @@ -2456,7 +2456,6 @@ func _Query_WeightAndSlippageFee_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.amm.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/amm/types/tx.pb.go b/x/amm/types/tx.pb.go index a5ca27bb7..d78a1e0d8 100644 --- a/x/amm/types/tx.pb.go +++ b/x/amm/types/tx.pb.go @@ -1736,7 +1736,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.amm.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/assetprofile/types/query.pb.go b/x/assetprofile/types/query.pb.go index 7714752de..0e7aebf93 100644 --- a/x/assetprofile/types/query.pb.go +++ b/x/assetprofile/types/query.pb.go @@ -604,7 +604,6 @@ func _Query_EntryAll_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.assetprofile.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/assetprofile/types/tx.pb.go b/x/assetprofile/types/tx.pb.go index 91425ae81..233237525 100644 --- a/x/assetprofile/types/tx.pb.go +++ b/x/assetprofile/types/tx.pb.go @@ -764,7 +764,6 @@ func _Msg_AddEntry_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.assetprofile.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/burner/types/query.pb.go b/x/burner/types/query.pb.go index 6a017de23..cee93dd9d 100644 --- a/x/burner/types/query.pb.go +++ b/x/burner/types/query.pb.go @@ -478,7 +478,6 @@ func _Query_HistoryAll_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.burner.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/burner/types/tx.pb.go b/x/burner/types/tx.pb.go index d2009e8ef..ef0787a4c 100644 --- a/x/burner/types/tx.pb.go +++ b/x/burner/types/tx.pb.go @@ -219,7 +219,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.burner.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/commitment/types/query.pb.go b/x/commitment/types/query.pb.go index 7f09c2524..f8c464c88 100644 --- a/x/commitment/types/query.pb.go +++ b/x/commitment/types/query.pb.go @@ -1556,7 +1556,6 @@ func _Query_TotalRewardProgramClaimed_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.commitment.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/commitment/types/tx.pb.go b/x/commitment/types/tx.pb.go index 8784146c4..648422ac5 100644 --- a/x/commitment/types/tx.pb.go +++ b/x/commitment/types/tx.pb.go @@ -2146,7 +2146,6 @@ func _Msg_ClaimRewardProgram_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.commitment.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/epochs/types/query.pb.go b/x/epochs/types/query.pb.go index e624e4fc2..ee12a5b7b 100644 --- a/x/epochs/types/query.pb.go +++ b/x/epochs/types/query.pb.go @@ -372,7 +372,6 @@ func _Query_CurrentEpoch_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.epochs.v1.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/estaking/types/query.pb.go b/x/estaking/types/query.pb.go index ad318b81d..d51e8b5d5 100644 --- a/x/estaking/types/query.pb.go +++ b/x/estaking/types/query.pb.go @@ -699,7 +699,6 @@ func _Query_EdenBBurnAmount_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.estaking.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/estaking/types/tx.pb.go b/x/estaking/types/tx.pb.go index 034c06d44..8b21218c9 100644 --- a/x/estaking/types/tx.pb.go +++ b/x/estaking/types/tx.pb.go @@ -762,7 +762,6 @@ func _Msg_UnjailGovernor_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.estaking.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/leveragelp/types/query.pb.go b/x/leveragelp/types/query.pb.go index fd1d67bec..4d9d81df6 100644 --- a/x/leveragelp/types/query.pb.go +++ b/x/leveragelp/types/query.pb.go @@ -2288,7 +2288,6 @@ func _Query_CommittedTokensLocked_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.leveragelp.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/leveragelp/types/tx.pb.go b/x/leveragelp/types/tx.pb.go index e0bd69b2a..6bde6fad0 100644 --- a/x/leveragelp/types/tx.pb.go +++ b/x/leveragelp/types/tx.pb.go @@ -1833,7 +1833,6 @@ func _Msg_ClaimAllUserRewards_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.leveragelp.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/masterchef/types/query.pb.go b/x/masterchef/types/query.pb.go index 70bf98ed8..af0ea23cc 100644 --- a/x/masterchef/types/query.pb.go +++ b/x/masterchef/types/query.pb.go @@ -2638,7 +2638,6 @@ func _Query_PendingRewards_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.masterchef.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/masterchef/types/tx.pb.go b/x/masterchef/types/tx.pb.go index 4996fadbe..65d582174 100644 --- a/x/masterchef/types/tx.pb.go +++ b/x/masterchef/types/tx.pb.go @@ -952,7 +952,6 @@ func _Msg_TogglePoolEdenRewards_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.masterchef.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index eff47e702..6790951b4 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -6,8 +6,6 @@ package types import ( context "context" fmt "fmt" - math "math" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,6 +13,7 @@ import ( proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index b25d7871b..f0dd44fc1 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -6,8 +6,6 @@ package types import ( context "context" fmt "fmt" - math "math" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -16,6 +14,7 @@ import ( grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/parameter/types/query.pb.go b/x/parameter/types/query.pb.go index ccd831bbd..e2b458e8a 100644 --- a/x/parameter/types/query.pb.go +++ b/x/parameter/types/query.pb.go @@ -209,7 +209,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.parameter.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/parameter/types/tx.pb.go b/x/parameter/types/tx.pb.go index 68c7c1b9d..33845e300 100644 --- a/x/parameter/types/tx.pb.go +++ b/x/parameter/types/tx.pb.go @@ -848,7 +848,6 @@ func _Msg_UpdateTakerFees_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.parameter.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/perpetual/keeper/adl.go b/x/perpetual/keeper/adl.go new file mode 100644 index 000000000..129267244 --- /dev/null +++ b/x/perpetual/keeper/adl.go @@ -0,0 +1,113 @@ +package keeper + +import ( + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" + "fmt" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/elys-network/elys/v6/x/perpetual/types" +) + +func (k Keeper) SetADLCounter(ctx sdk.Context, adlCounter types.ADLCounter) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.GetADLCounterKey(adlCounter.PoolId) + bz := k.cdc.MustMarshal(&adlCounter) + store.Set(key, bz) +} + +func (k Keeper) GetADLCounter(ctx sdk.Context, poolId uint64) (adlCounter types.ADLCounter) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + key := types.GetADLCounterKey(poolId) + bz := store.Get(key) + if bz == nil { + return types.ADLCounter{ + PoolId: poolId, + Counter: 0, + } + } + k.cdc.MustUnmarshal(bz, &adlCounter) + return adlCounter +} + +func (k Keeper) GetAllADLCounter(ctx sdk.Context) []types.ADLCounter { + + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStorePrefixIterator(store, types.ADLCounterPrefix) + defer iterator.Close() + + var list []types.ADLCounter + for ; iterator.Valid(); iterator.Next() { + var adlCounter types.ADLCounter + k.cdc.MustUnmarshal(iterator.Value(), &adlCounter) + list = append(list, adlCounter) + } + + return list +} + +func (k Keeper) ClosePositionsOnADL(ctx sdk.Context, perpetualPool types.Pool) error { + // closing ratio = (current ratio - max leverage) / current ratio + // we use max leverage instead of adl trigger ratio because then this whole thing will be asymptotic and + // process will never end. adl trigger stops that by being higher + currentMaxLiabilitiesRatio := math.LegacyMaxDec(perpetualPool.BaseAssetLiabilitiesRatio, perpetualPool.QuoteAssetLiabilitiesRatio) + params := k.GetParams(ctx) + closingRatio := currentMaxLiabilitiesRatio.Sub(params.PoolMaxLiabilitiesThreshold).Quo(currentMaxLiabilitiesRatio) + if closingRatio.IsZero() || closingRatio.IsNegative() { + err := fmt.Errorf("closing ratio is <= 0 for pool while triggering adl for pool id %d in perpetual", perpetualPool.AmmPoolId) + ctx.Logger().Error(err.Error()) + return err + } + + if closingRatio.GT(math.LegacyOneDec()) { + closingRatio = math.LegacyOneDec() + } + + pageReq := &query.PageRequest{ + Limit: params.NumberPerBlock, + CountTotal: true, + } + adlCounter := k.GetADLCounter(ctx, perpetualPool.AmmPoolId) + if len(adlCounter.NextKey) != 0 { + pageReq.Key = adlCounter.NextKey + } else { + pageReq.Offset = 0 + } + totalOpen := k.GetPerpetualCounter(ctx, perpetualPool.AmmPoolId).TotalOpen + if adlCounter.Counter+params.NumberPerBlock >= totalOpen { + adlCounter.Counter = 0 + } else { + adlCounter.Counter += params.NumberPerBlock + } + + mtps, pageResponse, err := k.GetPositionsForPool(ctx, perpetualPool.AmmPoolId, pageReq) + if err != nil { + ctx.Logger().Error(errorsmod.Wrap(err, "error fetching paginated positions").Error()) + return err + } + adlCounter.NextKey = pageResponse.NextKey + k.SetADLCounter(ctx, adlCounter) + + for _, mtp := range mtps { + ammPool, err := k.GetAmmPool(ctx, perpetualPool.AmmPoolId) + if err != nil { + return err + } + msg := types.NewMsgClose(mtp.Address, mtp.Id, math.ZeroInt(), perpetualPool.AmmPoolId, closingRatio) + closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, err := k.ClosePosition(ctx, msg) + if err != nil { + return err + } + + tradingAssetPrice, _, err := k.GetAssetPriceAndAssetUsdcDenomRatio(ctx, closedMtp.TradingAsset) + if err != nil { + return err + } + + perpFeesInUsd, slippageFeesInUsd, weightBreakingFeesInUsd, takerFeesInUsd := k.GetPerpFeesInUSD(ctx, totalPerpetualFeesCoins) + + } + return nil +} diff --git a/x/perpetual/keeper/close_position.go b/x/perpetual/keeper/close_position.go index 6ea8acd2f..a894e25a1 100644 --- a/x/perpetual/keeper/close_position.go +++ b/x/perpetual/keeper/close_position.go @@ -40,14 +40,18 @@ func (k Keeper) ClosePosition(ctx sdk.Context, msg *types.MsgClose) (types.MTP, } // Should be declared after SettleMTPBorrowInterestUnpaidLiability and settling funding - closingRatio := msg.Amount.ToLegacyDec().Quo(mtp.Custody.ToLegacyDec()) - if mtp.Position == types.Position_SHORT { - closingRatio = msg.Amount.ToLegacyDec().Quo(mtp.Liabilities.ToLegacyDec()) + var closingRatio math.LegacyDec + if msg.ClosingRatio.IsPositive() { + closingRatio = msg.ClosingRatio + } else { + closingRatio = msg.Amount.ToLegacyDec().Quo(mtp.Custody.ToLegacyDec()) + if mtp.Position == types.Position_SHORT { + closingRatio = msg.Amount.ToLegacyDec().Quo(mtp.Liabilities.ToLegacyDec()) + } } if closingRatio.GT(math.LegacyOneDec()) { closingRatio = math.LegacyOneDec() } - // Estimate swap and repay repayAmt, returnAmt, perpFees, err := k.EstimateAndRepay(ctx, &mtp, &pool, &ammPool, closingRatio) if err != nil { diff --git a/x/perpetual/keeper/mtp.go b/x/perpetual/keeper/mtp.go index 5034fb5ef..d681ba9e3 100644 --- a/x/perpetual/keeper/mtp.go +++ b/x/perpetual/keeper/mtp.go @@ -90,9 +90,14 @@ func (k Keeper) GetMTPData(ctx sdk.Context, pagination *query.PageRequest, addre store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) var mtpStore storetypes.KVStore - if address != nil { - mtpStore = prefix.NewStore(store, types.GetMTPPrefixForAddress(address)) - } else { + switch true { + case address == nil && ammPoolId == nil: + mtpStore = prefix.NewStore(store, types.MTPPrefix) + case address == nil && ammPoolId != nil: + mtpStore = prefix.NewStore(store, types.GetMTPPrefixForPoolId(*ammPoolId)) + case address != nil && ammPoolId != nil: + mtpStore = prefix.NewStore(store, types.GetMTPPrefixForAddressAndPoolId(address, *ammPoolId)) + default: mtpStore = prefix.NewStore(store, types.MTPPrefix) } @@ -116,10 +121,6 @@ func (k Keeper) GetMTPData(ctx sdk.Context, pagination *query.PageRequest, addre var mtp types.MTP k.cdc.MustUnmarshal(value, &mtp) - if ammPoolId != nil && mtp.AmmPoolId != *ammPoolId { - return nil - } - mtpAndPrice, err := k.fillMTPData(ctx, mtp, baseCurrency) if err != nil { return err @@ -206,23 +207,6 @@ func (k Keeper) fillMTPData(ctx sdk.Context, mtp types.MTP, baseCurrency string) }, nil } -func (k Keeper) GetAllMTPsForAddress(ctx sdk.Context, mtpAddress sdk.AccAddress) []*types.MTP { - var mtps []*types.MTP - - store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) - iterator := storetypes.KVStorePrefixIterator(store, types.GetMTPPrefixForAddress(mtpAddress)) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var mtp types.MTP - bytesValue := iterator.Value() - k.cdc.MustUnmarshal(bytesValue, &mtp) - mtps = append(mtps, &mtp) - } - return mtps -} - func (k Keeper) GetAllMTPsForAddressAndByPool(ctx sdk.Context, mtpAddress sdk.AccAddress, poolId uint64) []*types.MTP { var mtps []*types.MTP @@ -248,20 +232,18 @@ func (k Keeper) GetMTPsForPool(ctx sdk.Context, ammPoolId uint64, pagination *qu return k.GetMTPData(ctx, pagination, nil, &ammPoolId) } -func (k Keeper) GetMTPsForAddressWithPagination(ctx sdk.Context, mtpAddress sdk.AccAddress, pagination *query.PageRequest) ([]*types.MtpAndPrice, *query.PageResponse, error) { - return k.GetMTPData(ctx, pagination, mtpAddress, nil) -} - -// Delete all to pay if any -func (k Keeper) DeleteAllToPay(ctx sdk.Context) error { - store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{0x09}) - defer iterator.Close() +func (k Keeper) GetAllMTPForAddress(ctx sdk.Context, mtpAddress sdk.AccAddress) ([]*types.MtpAndPrice, error) { + allPools := k.GetAllPools(ctx) + var list []*types.MtpAndPrice - for ; iterator.Valid(); iterator.Next() { - store.Delete(iterator.Key()) + for _, pool := range allPools { + positions, _, err := k.GetMTPData(ctx, nil, mtpAddress, &pool.AmmPoolId) + if err != nil { + return nil, err + } + list = append(list, positions...) } - return nil + return list, nil } func (k Keeper) GetEstimatedPnL(ctx sdk.Context, mtp types.MTP, baseCurrency string, useTakeProfitPrice bool) (math.Int, error) { @@ -388,3 +370,57 @@ func (k Keeper) GetExistingPosition(ctx sdk.Context, msg *types.MsgOpen) *types. } return nil } + +func (k Keeper) GetPositionsForPool(ctx sdk.Context, ammPoolId uint64, pagination *query.PageRequest) ([]types.MTP, *query.PageResponse, error) { + var positions []types.MTP + + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + positionStore := prefix.NewStore(store, types.GetMTPPrefixForPoolId(ammPoolId)) + + if pagination == nil { + pagination = &query.PageRequest{ + Limit: types.MaxPageLimit, + } + } + + if pagination.Limit > types.MaxPageLimit { + return nil, nil, status.Error(codes.InvalidArgument, fmt.Sprintf("page size greater than max %d", types.MaxPageLimit)) + } + + pageRes, err := query.Paginate(positionStore, pagination, func(key []byte, value []byte) error { + var position types.MTP + err := k.cdc.Unmarshal(value, &position) + if err != nil { + return err + } + positions = append(positions, position) + return nil + }) + + return positions, pageRes, err +} + +func (k Keeper) DeleteLegacyMTP(ctx sdk.Context, mtp types.MTP) { + key := types.GetLegacyMTPKey(mtp.GetAccountAddress(), mtp.AmmPoolId, mtp.Id) + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store.Delete(key) +} +func (k Keeper) MigrateToNewKeys(ctx sdk.Context) { + + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + iterator := storetypes.KVStorePrefixIterator(store, types.LegacyMTPPrefix) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var mtp types.MTP + bytesValue := iterator.Value() + k.cdc.MustUnmarshal(bytesValue, &mtp) + err := k.SetMTP(ctx, &mtp) + if err != nil { + panic(err) + } + k.DeleteLegacyMTP(ctx, mtp) + } + return +} diff --git a/x/perpetual/keeper/query_get_positions_for_address.go b/x/perpetual/keeper/query_get_positions_for_address.go index 973eafaf2..d68f877d9 100644 --- a/x/perpetual/keeper/query_get_positions_for_address.go +++ b/x/perpetual/keeper/query_get_positions_for_address.go @@ -19,10 +19,10 @@ func (k Keeper) GetPositionsForAddress(goCtx context.Context, req *types.Positio return nil, err } - mtps, pageRes, err := k.GetMTPsForAddressWithPagination(sdk.UnwrapSDKContext(goCtx), addr, req.Pagination) + mtps, err := k.GetAllMTPForAddress(sdk.UnwrapSDKContext(goCtx), addr) if err != nil { return nil, err } - return &types.PositionsForAddressResponse{Mtps: mtps, Pagination: pageRes}, nil + return &types.PositionsForAddressResponse{Mtps: mtps}, nil } diff --git a/x/perpetual/keeper/reset_store.go b/x/perpetual/keeper/reset_store.go deleted file mode 100644 index c4d86ae70..000000000 --- a/x/perpetual/keeper/reset_store.go +++ /dev/null @@ -1,43 +0,0 @@ -package keeper - -import ( - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/runtime" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/elys-network/elys/v6/x/perpetual/types" -) - -// ResetStore resets all keys in the perpetual module store -func (k Keeper) ResetStore(ctx sdk.Context) error { - store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) - - // List of prefixes to clear - prefixes := [][]byte{ - types.MTPPrefix, - types.LegacyMTPCountPrefix, - types.LegacyOpenMTPCountPrefix, - types.WhitelistPrefix, - types.PerpetualCounterPrefix, - } - - for _, prefix := range prefixes { - iter := storetypes.KVStorePrefixIterator(store, prefix) - defer iter.Close() - - for ; iter.Valid(); iter.Next() { - store.Delete(iter.Key()) - } - } - - params := k.GetParams(ctx) - allPools := k.GetAllPools(ctx) - for _, pool := range allPools { - ammPool, err := k.GetAmmPool(ctx, pool.AmmPoolId) - if err != nil { - return err - } - resetPool := types.NewPool(ammPool, params.LeverageMax) - k.SetPool(ctx, resetPool) - } - return nil -} diff --git a/x/perpetual/keeper/reset_store_test.go b/x/perpetual/keeper/reset_store_test.go deleted file mode 100644 index c5cb8e492..000000000 --- a/x/perpetual/keeper/reset_store_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package keeper_test - -func (suite *PerpetualKeeperTestSuite) TestResetStore() { - suite.Require().Nil(suite.app.PerpetualKeeper.ResetStore(suite.ctx)) -} diff --git a/x/perpetual/migrations/v13_migration.go b/x/perpetual/migrations/v13_migration.go index 935c756fe..ce5ad2d10 100644 --- a/x/perpetual/migrations/v13_migration.go +++ b/x/perpetual/migrations/v13_migration.go @@ -5,6 +5,6 @@ import ( ) func (m Migrator) V13Migration(ctx sdk.Context) error { - m.keeper.DeleteAllToPay(ctx) + //m.keeper.DeleteAllToPay(ctx) return nil } diff --git a/x/perpetual/migrations/v19_migration.go b/x/perpetual/migrations/v19_migration.go index fdb12e86a..5d3970aa2 100644 --- a/x/perpetual/migrations/v19_migration.go +++ b/x/perpetual/migrations/v19_migration.go @@ -1,133 +1,9 @@ package migrations import ( - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/elys-network/elys/v6/x/perpetual/types" ) func (m Migrator) V19Migration(ctx sdk.Context) error { - - legacyParams := m.keeper.GetLegacyParams(ctx) - - params := types.Params{ - LeverageMax: legacyParams.LeverageMax, - BorrowInterestRateMax: legacyParams.BorrowInterestRateMax, - BorrowInterestRateMin: legacyParams.BorrowInterestRateMin, - BorrowInterestRateIncrease: legacyParams.BorrowInterestRateIncrease, - BorrowInterestRateDecrease: legacyParams.BorrowInterestRateDecrease, - HealthGainFactor: legacyParams.HealthGainFactor, - MaxOpenPositions: legacyParams.MaxOpenPositions, - PoolMaxLiabilitiesThreshold: math.LegacyMustNewDecFromStr("0.3"), - BorrowInterestPaymentFundPercentage: legacyParams.BorrowInterestPaymentFundPercentage, - SafetyFactor: math.LegacyMustNewDecFromStr("1.035"), - BorrowInterestPaymentEnabled: legacyParams.BorrowInterestPaymentEnabled, - WhitelistingEnabled: true, - PerpetualSwapFee: math.LegacyMustNewDecFromStr("0.0005"), - MaxLimitOrder: legacyParams.MaxLimitOrder, - FixedFundingRate: math.LegacyMustNewDecFromStr("0.3"), - MinimumLongTakeProfitPriceRatio: math.LegacyMustNewDecFromStr("1.01"), - MaximumLongTakeProfitPriceRatio: legacyParams.MaximumLongTakeProfitPriceRatio, - MaximumShortTakeProfitPriceRatio: legacyParams.MaximumShortTakeProfitPriceRatio, - WeightBreakingFeeFactor: legacyParams.WeightBreakingFeeFactor, - EnabledPools: []uint64{1, 13}, - MinimumNotionalValue: math.LegacyNewDec(10), - LongMinimumLiabilityAmount: math.NewInt(1_000_000), - } - - err := m.keeper.SetParams(ctx, ¶ms) - if err != nil { - return err - } - - allLegacyPools := m.keeper.GetAllLegacyPools(ctx) - for _, legacyPool := range allLegacyPools { - var poolAssetLong []types.PoolAsset - for _, legacyPoolAsset := range legacyPool.PoolAssetsLong { - poolAssetLong = append(poolAssetLong, types.PoolAsset{ - AssetDenom: legacyPoolAsset.AssetDenom, - Liabilities: legacyPoolAsset.Liabilities, - Custody: legacyPoolAsset.Custody, - Collateral: legacyPoolAsset.Collateral, - }) - } - - var poolAssetShort []types.PoolAsset - for _, legacyPoolAsset := range legacyPool.PoolAssetsShort { - poolAssetShort = append(poolAssetShort, types.PoolAsset{ - AssetDenom: legacyPoolAsset.AssetDenom, - Liabilities: legacyPoolAsset.Liabilities, - Custody: legacyPoolAsset.Custody, - Collateral: legacyPoolAsset.Collateral, - }) - } - pool := types.Pool{ - AmmPoolId: legacyPool.AmmPoolId, - BaseAssetLiabilitiesRatio: legacyPool.BaseAssetLiabilitiesRatio, - QuoteAssetLiabilitiesRatio: legacyPool.QuoteAssetLiabilitiesRatio, - BorrowInterestRate: legacyPool.BorrowInterestRate, - PoolAssetsLong: poolAssetLong, - PoolAssetsShort: poolAssetShort, - LastHeightBorrowInterestRateComputed: legacyPool.LastHeightBorrowInterestRateComputed, - FundingRate: legacyPool.FundingRate, - FeesCollected: legacyPool.FeesCollected, - LeverageMax: legacyPool.LeverageMax, - } - m.keeper.SetPool(ctx, pool) - } - err = m.keeper.ResetStore(ctx) - if err != nil { - return err - } - - addresses := []string{ - "elys1tnk45uvxvdsemhd0pnl5y72jl43lwwm0wp0sls", - "elys1pg2l3len5ueu2anchzchwnlm2msus4u2ng2ayh", - "elys1rqv99msxgkyww7nm8p785p7cj2tc2upuzkq86t", - "elys1kqh8fjrpj2cqmunfx7fmz0rxfyx06l3f829e3k", - "elys1uuvvh83hpd3jndpt9l8tw63r7k63z9as4pw56k", - "elys14mwhegj74cs90nlgdfmrgjlgd7rpq0yxcmpk5y", - "elys1r5muk8te0z2url8kntgjst7wygnfmr8xyvk6hh", - "elys1jr47lp2smyrj05f0w978pdw3thrqlsnv28h4qq", - "elys106ps2h8y6mpnvl4f5lpjna87pv0ajasasllk96", - "elys1yyv8gvfjg2x9d6zqrpr849mt87k49swehlmglj", - "elys1tapvntnssnm4vqqqh8jxnv0fswc87nh9gncvrn", - "elys1fth2nyd6g9q03n90ddrljfcxa8vja0wc8negut", - "elys1c4u0h8h4wcwf3vq05ey3fee04tq445cz4xt2z4", - "elys1k0zdx92k6d60vszdhm45hk4tpn06f6kglr5tu9", - "elys1gsj0jh9z9mynemm4vjyc88wldw2trtg68hs7q3", - "elys1mvmdf9vhw4seyfsgyn03czk4kzts7xj9sxkxzg", - "elys1x3ylxxpjtfxvtrvgg5rh80feh02rymmvu2jl0g", - "elys1ms0vtn0580p26rdlvcz8gulykxc0dl0qq9twj3", - "elys190k0y8m6pktew6xs58q2dgfarqyxj3zsahpkpg", - "elys1vm469w820ug8cxln03wlnsnwmt2pwx828w3ajq", - "elys1s7ek72d84jvrhnugcte57rxgnf8vjwtlyuj587", - "elys10xh5sna7f7j6ptsysp8d7c86rv42ddq4f7h003", - "elys1u870ksd35rctnae70kl602hzrqcnwe8tqula3z", - "elys1u93z584nyvufs647ut6re6dy4z9q3kr9gy7c6p", - "elys133df0rz42d49jl3hzh6gtv6gf42x8vqam4he8p", - "elys17qacjuwz58vupckhyz0g20f742khmfxs57yvjp", - "elys1tcfusja8ekyxjkmguvfyfm5jl2jl20pxmyznaj", - "elys1ur7tfac3y6m5v4xlvx66avpyv602na4v5safsr", - "elys1un3ttecl2223hlep88qke0els9eaw3vqvzr5vt", - "elys1c69yrjgrka9yafg7wcx4a0kwru9jwvwq8kf7ek", - "elys1nsqef88pu5n2qa3gxppsm6ud0mua93xrqg3cm0", - } - - for _, address := range addresses { - m.keeper.WhitelistAddress(ctx, sdk.MustAccAddressFromBech32(address)) - } - - atomPool, found := m.keeper.GetPool(ctx, 1) - if found { - atomPool.LeverageMax = math.LegacyMustNewDecFromStr("5.0") - m.keeper.SetPool(ctx, atomPool) - } - - btcPool, found := m.keeper.GetPool(ctx, 13) - if found { - btcPool.LeverageMax = math.LegacyMustNewDecFromStr("10.0") - m.keeper.SetPool(ctx, btcPool) - } return nil } diff --git a/x/perpetual/migrations/v21_migration.go b/x/perpetual/migrations/v21_migration.go new file mode 100644 index 000000000..d14da8df5 --- /dev/null +++ b/x/perpetual/migrations/v21_migration.go @@ -0,0 +1,17 @@ +package migrations + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (m Migrator) V21Migration(ctx sdk.Context) error { + params := m.keeper.GetParams(ctx) + params.ExitBuffer = math.LegacyMustNewDecFromStr("0.1") + params.NumberPerBlock = 5 + err := m.keeper.SetParams(ctx, ¶ms) + if err != nil { + return err + } + return nil +} diff --git a/x/perpetual/module.go b/x/perpetual/module.go index 0f5f2154f..fb76acf52 100644 --- a/x/perpetual/module.go +++ b/x/perpetual/module.go @@ -125,7 +125,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := migrations.NewMigrator(am.keeper) - err := cfg.RegisterMigration(types.ModuleName, 19, m.V20Migration) + err := cfg.RegisterMigration(types.ModuleName, 20, m.V21Migration) if err != nil { panic(err) } @@ -152,7 +152,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 -func (AppModule) ConsensusVersion() uint64 { return 20 } +func (AppModule) ConsensusVersion() uint64 { return 21 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(gotCtx context.Context) error { diff --git a/x/perpetual/types/genesis.pb.go b/x/perpetual/types/genesis.pb.go index ec37ba031..731e90cdb 100644 --- a/x/perpetual/types/genesis.pb.go +++ b/x/perpetual/types/genesis.pb.go @@ -30,6 +30,7 @@ type GenesisState struct { MtpList []MTP `protobuf:"bytes,3,rep,name=mtp_list,json=mtpList,proto3" json:"mtp_list"` AddressWhitelist []string `protobuf:"bytes,4,rep,name=address_whitelist,json=addressWhitelist,proto3" json:"address_whitelist,omitempty"` PerpetualCounter []PerpetualCounter `protobuf:"bytes,5,rep,name=perpetual_counter,json=perpetualCounter,proto3" json:"perpetual_counter"` + AdlCounter []ADLCounter `protobuf:"bytes,6,rep,name=adl_counter,json=adlCounter,proto3" json:"adl_counter"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -100,6 +101,13 @@ func (m *GenesisState) GetPerpetualCounter() []PerpetualCounter { return nil } +func (m *GenesisState) GetAdlCounter() []ADLCounter { + if m != nil { + return m.AdlCounter + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "elys.perpetual.GenesisState") } @@ -107,28 +115,30 @@ func init() { func init() { proto.RegisterFile("elys/perpetual/genesis.proto", fileDescriptor_2b712f25285e9e2d) } var fileDescriptor_2b712f25285e9e2d = []byte{ - // 331 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xc1, 0x4a, 0x02, 0x41, - 0x18, 0xc7, 0x77, 0xd5, 0x4c, 0xc7, 0x08, 0xdd, 0x24, 0x6c, 0x8b, 0x6d, 0xe9, 0x24, 0x44, 0x3b, - 0x64, 0x52, 0xf7, 0x3a, 0x74, 0xa8, 0x40, 0x34, 0x08, 0xba, 0xc8, 0xaa, 0xc3, 0xba, 0xb4, 0xeb, - 0x0c, 0x33, 0x9f, 0x99, 0x6f, 0xd1, 0xcb, 0xf4, 0x0e, 0x1e, 0x3d, 0x76, 0x8a, 0x70, 0x5f, 0x24, - 0x76, 0x76, 0x14, 0x1a, 0x6f, 0x33, 0xf3, 0xfb, 0xff, 0xfe, 0xdf, 0x07, 0x83, 0x4e, 0x48, 0x34, - 0x17, 0x98, 0x11, 0xce, 0x08, 0x4c, 0xfd, 0x08, 0x07, 0x64, 0x42, 0x44, 0x28, 0x3c, 0xc6, 0x29, - 0x50, 0x6b, 0x3f, 0xa5, 0xde, 0x86, 0xda, 0xf5, 0x80, 0x06, 0x54, 0x22, 0x9c, 0x9e, 0xb2, 0x94, - 0x7d, 0xac, 0x75, 0x30, 0x9f, 0xfb, 0xb1, 0xaa, 0xb0, 0x8f, 0x74, 0x48, 0x69, 0xa4, 0x90, 0xad, - 0x21, 0x98, 0x33, 0xa2, 0xb4, 0xb3, 0xaf, 0x1c, 0xda, 0xbb, 0xcf, 0x76, 0xe9, 0x81, 0x0f, 0xc4, - 0x6a, 0xa3, 0x62, 0xd6, 0xdb, 0x30, 0x5d, 0xb3, 0x59, 0x69, 0x1d, 0x7a, 0xff, 0x77, 0xf3, 0x3a, - 0x92, 0xde, 0x16, 0x16, 0x3f, 0xa7, 0x46, 0x57, 0x65, 0xad, 0x1b, 0x54, 0x4e, 0x07, 0xf6, 0xa3, - 0x50, 0x40, 0x23, 0xe7, 0xe6, 0x9b, 0x95, 0x56, 0x7d, 0x4b, 0xa4, 0x34, 0x52, 0x5a, 0x29, 0x0d, - 0x3f, 0x86, 0x02, 0xac, 0x36, 0x2a, 0xc5, 0xc0, 0x32, 0x2f, 0x2f, 0xbd, 0x03, 0xdd, 0x7b, 0x7a, - 0xee, 0x28, 0x6d, 0x37, 0x06, 0x26, 0xad, 0x73, 0x54, 0xf3, 0x47, 0x23, 0x4e, 0x84, 0xe8, 0xcf, - 0xc6, 0x21, 0x10, 0xa9, 0x17, 0xdc, 0x7c, 0xb3, 0xdc, 0xad, 0x2a, 0xf0, 0xb2, 0x7e, 0xb7, 0x7a, - 0xa8, 0xb6, 0x29, 0xeb, 0x0f, 0xe9, 0x74, 0x02, 0x84, 0x37, 0x76, 0xe4, 0x2c, 0x77, 0x6b, 0xc7, - 0xf5, 0xe9, 0x2e, 0xcb, 0xa9, 0xc1, 0x55, 0xa6, 0xbf, 0x3f, 0x2c, 0x56, 0x8e, 0xb9, 0x5c, 0x39, - 0xe6, 0xef, 0xca, 0x31, 0x3f, 0x13, 0xc7, 0x58, 0x26, 0x8e, 0xf1, 0x9d, 0x38, 0xc6, 0xeb, 0x65, - 0x10, 0xc2, 0x78, 0x3a, 0xf0, 0x86, 0x34, 0xc6, 0x69, 0xfb, 0xc5, 0x84, 0xc0, 0x8c, 0xf2, 0x37, - 0x79, 0xc1, 0xef, 0xd7, 0xf8, 0x43, 0xff, 0x8a, 0x41, 0x51, 0xfe, 0xc5, 0xd5, 0x5f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x67, 0xbc, 0xa0, 0x08, 0x25, 0x02, 0x00, 0x00, + // 354 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x41, 0x4b, 0x32, 0x41, + 0x18, 0xc7, 0x77, 0xd5, 0xd7, 0x57, 0xc7, 0x97, 0x17, 0xdd, 0x24, 0x6c, 0x8b, 0x6d, 0xe9, 0x24, + 0x44, 0xbb, 0x64, 0x52, 0x67, 0x2b, 0xe8, 0x90, 0x81, 0x68, 0x10, 0x74, 0x91, 0xd1, 0x1d, 0xd6, + 0xa5, 0x5d, 0x67, 0xd8, 0x79, 0xcc, 0xfc, 0x16, 0x7d, 0x2c, 0x8f, 0x1e, 0x3b, 0x45, 0xe8, 0x97, + 0xe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0x4e, 0xc6, 0x40, 0xe2, 0xda, 0x1f, 0x31, 0xcb, + 0xde, 0xd9, 0x71, 0x7d, 0xba, 0x49, 0x7b, 0x72, 0x70, 0x99, 0x29, 0xef, 0x46, 0x0b, 0x95, 0xb0, + 0xf7, 0xab, 0xcb, 0x0b, 0x9d, 0xa9, 0xea, 0x5a, 0xb7, 0xed, 0x6d, 0x11, 0xc2, 0xde, 0x46, 0x7d, + 0x3f, 0x5f, 0x5a, 0xfa, 0x62, 0x69, 0xe9, 0x5f, 0x4b, 0x4b, 0x7f, 0x5f, 0x59, 0xda, 0x62, 0x65, + 0x69, 0x1f, 0x2b, 0x4b, 0x7b, 0x3e, 0xf7, 0x03, 0x18, 0x4d, 0x06, 0xce, 0x90, 0x46, 0x6e, 0x62, + 0x3c, 0x1b, 0x13, 0x98, 0xd2, 0xf8, 0x45, 0x5c, 0xdc, 0xd7, 0x4b, 0xf7, 0x4d, 0xfd, 0xcd, 0x41, + 0x5e, 0x7c, 0xe7, 0xc5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x2b, 0xdb, 0x76, 0x68, 0x02, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -151,6 +161,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AdlCounter) > 0 { + for iNdEx := len(m.AdlCounter) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AdlCounter[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } if len(m.PerpetualCounter) > 0 { for iNdEx := len(m.PerpetualCounter) - 1; iNdEx >= 0; iNdEx-- { { @@ -258,6 +282,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.AdlCounter) > 0 { + for _, e := range m.AdlCounter { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -463,6 +493,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdlCounter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AdlCounter = append(m.AdlCounter, ADLCounter{}) + if err := m.AdlCounter[len(m.AdlCounter)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/perpetual/types/keys.go b/x/perpetual/types/keys.go index 83b06abe9..67a147f79 100644 --- a/x/perpetual/types/keys.go +++ b/x/perpetual/types/keys.go @@ -33,16 +33,15 @@ var ( ) var ( - MTPPrefix = []byte{0x01} + LegacyMTPPrefix = []byte{0x01} PerpetualCounterPrefix = []byte{0x02} WhitelistPrefix = []byte{0x05} PoolKeyPrefix = []byte{0x06} InterestRatePrefix = []byte{0x07} FundingRatePrefix = []byte{0x08} - // Delete after v18 migration - LegacyMTPCountPrefix = []byte{0x02} - LegacyOpenMTPCountPrefix = []byte{0x04} + MTPPrefix = []byte{0x03} + ADLCounterPrefix = []byte{0x04} ) func KeyPrefix(p string) []byte { @@ -60,20 +59,30 @@ func GetWhitelistKey(addr sdk.AccAddress) []byte { return append(WhitelistPrefix, address.MustLengthPrefix(addr)...) } -func GetMTPPrefixForAddress(addr sdk.AccAddress) []byte { - return append(MTPPrefix, address.MustLengthPrefix(addr)...) +func GetLegacyMTPKey(addr sdk.AccAddress, poolId, id uint64) []byte { + key := append(LegacyMTPPrefix, address.MustLengthPrefix(addr)...) + key = append(key, []byte("/")...) + key = append(key, GetUint64Bytes(poolId)...) + key = append(key, []byte("/")...) + key = append(key, GetUint64Bytes(id)...) + return key +} + +func GetMTPPrefixForPoolId(poolId uint64) []byte { + key := append(MTPPrefix, GetUint64Bytes(poolId)...) + key = append(key, []byte("/")...) + return key } func GetMTPPrefixForAddressAndPoolId(addr sdk.AccAddress, poolId uint64) []byte { - key := GetMTPPrefixForAddress(addr) + key := GetMTPPrefixForPoolId(poolId) + key = append(key, address.MustLengthPrefix(addr)...) key = append(key, []byte("/")...) - key = append(key, GetUint64Bytes(poolId)...) return key } func GetMTPKey(addr sdk.AccAddress, poolId, id uint64) []byte { key := GetMTPPrefixForAddressAndPoolId(addr, poolId) - key = append(key, []byte("/")...) key = append(key, GetUint64Bytes(id)...) return key } @@ -94,3 +103,7 @@ func GetFundingRateKey(block uint64, pool uint64) []byte { func GePerpetualCounterKey(ammPoolId uint64) []byte { return append(PerpetualCounterPrefix, sdk.Uint64ToBigEndian(ammPoolId)...) } + +func GetADLCounterKey(ammPoolId uint64) []byte { + return append(ADLCounterPrefix, sdk.Uint64ToBigEndian(ammPoolId)...) +} diff --git a/x/perpetual/types/message_close.go b/x/perpetual/types/message_close.go index 19a895372..5e12cc5e5 100644 --- a/x/perpetual/types/message_close.go +++ b/x/perpetual/types/message_close.go @@ -6,16 +6,18 @@ import ( "errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/elys-network/elys/v6/utils" ) var _ sdk.Msg = &MsgClose{} -func NewMsgClose(creator string, id uint64, amount math.Int, poolId uint64) *MsgClose { +func NewMsgClose(creator string, id uint64, amount math.Int, poolId uint64, closingRatio math.LegacyDec) *MsgClose { return &MsgClose{ - Creator: creator, - Id: id, - Amount: amount, - PoolId: poolId, + Creator: creator, + Id: id, + Amount: amount, + PoolId: poolId, + ClosingRatio: closingRatio, } } @@ -25,15 +27,21 @@ func (msg *MsgClose) ValidateBasic() error { return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if msg.Amount.IsNil() { + if msg.Amount.IsNil() || msg.Amount.IsNegative() { return ErrInvalidAmount } - if msg.Amount.IsNegative() || msg.Amount.IsZero() { - return ErrInvalidAmount + if err = utils.CheckLegacyDecNilAndNegative(msg.ClosingRatio, "ClosingRatio"); err != nil { + return err + } + + if msg.Amount.IsZero() && msg.ClosingRatio.IsZero() { + return errors.New("closing ratio and amount both cannot be zero") } + if msg.PoolId == 0 { return errors.New("invalid pool id") } + return nil } diff --git a/x/perpetual/types/message_close_test.go b/x/perpetual/types/message_close_test.go index b40c6d979..8b93ec9c1 100644 --- a/x/perpetual/types/message_close_test.go +++ b/x/perpetual/types/message_close_test.go @@ -18,13 +18,15 @@ func TestNewMsgClose(t *testing.T) { 2, math.NewInt(20), 1, + math.LegacyOneDec(), ) want := &MsgClose{ - Creator: accAdress, - Id: 2, - Amount: math.NewInt(20), - PoolId: 1, + Creator: accAdress, + Id: 2, + Amount: math.NewInt(20), + PoolId: 1, + ClosingRatio: math.LegacyOneDec(), } assert.Equal(t, want, got) @@ -61,21 +63,41 @@ func TestMsgClose_ValidateBasic(t *testing.T) { }, want: ErrInvalidAmount, }, + { + title: "invalid closing ratio", + msg: MsgClose{ + Creator: sample.AccAddress(), + Amount: math.NewInt(20), + ClosingRatio: math.LegacyOneDec().MulInt64(-1), + }, + want: errors.New("ClosingRatio is nil"), + }, + { + title: "invalid closing ratio", + msg: MsgClose{ + Creator: sample.AccAddress(), + Amount: math.NewInt(0), + ClosingRatio: math.LegacyZeroDec(), + }, + want: errors.New("closing ratio and amount both cannot be zero"), + }, { title: "invalid pool id", msg: MsgClose{ - Creator: sample.AccAddress(), - Amount: math.NewInt(20), - PoolId: 0, + Creator: sample.AccAddress(), + Amount: math.NewInt(20), + PoolId: 0, + ClosingRatio: math.LegacyOneDec(), }, want: errors.New("invalid pool id"), }, { title: "successful", msg: MsgClose{ - Creator: sample.AccAddress(), - Amount: math.NewInt(20), - PoolId: 1, + Creator: sample.AccAddress(), + Amount: math.NewInt(20), + PoolId: 1, + ClosingRatio: math.LegacyOneDec(), }, want: nil, }, diff --git a/x/perpetual/types/params.pb.go b/x/perpetual/types/params.pb.go index d0a032fae..725260afc 100644 --- a/x/perpetual/types/params.pb.go +++ b/x/perpetual/types/params.pb.go @@ -25,130 +25,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type LegacyParams struct { - LeverageMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"` - BorrowInterestRateMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=borrow_interest_rate_max,json=borrowInterestRateMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_max"` - BorrowInterestRateMin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=borrow_interest_rate_min,json=borrowInterestRateMin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_min"` - BorrowInterestRateIncrease cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=borrow_interest_rate_increase,json=borrowInterestRateIncrease,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_increase"` - BorrowInterestRateDecrease cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=borrow_interest_rate_decrease,json=borrowInterestRateDecrease,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_decrease"` - HealthGainFactor cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=health_gain_factor,json=healthGainFactor,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"health_gain_factor"` - MaxOpenPositions int64 `protobuf:"varint,7,opt,name=max_open_positions,json=maxOpenPositions,proto3" json:"max_open_positions,omitempty"` - PoolMaxLiabilitiesThreshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=pool_max_liabilities_threshold,json=poolMaxLiabilitiesThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"pool_max_liabilities_threshold"` - BorrowInterestPaymentFundPercentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=borrow_interest_payment_fund_percentage,json=borrowInterestPaymentFundPercentage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_payment_fund_percentage"` - LegacyBorrowInterestPaymentFundAddress string `protobuf:"bytes,10,opt,name=legacy_borrow_interest_payment_fund_address,json=legacyBorrowInterestPaymentFundAddress,proto3" json:"legacy_borrow_interest_payment_fund_address,omitempty"` - SafetyFactor cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=safety_factor,json=safetyFactor,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"safety_factor"` - BorrowInterestPaymentEnabled bool `protobuf:"varint,12,opt,name=borrow_interest_payment_enabled,json=borrowInterestPaymentEnabled,proto3" json:"borrow_interest_payment_enabled,omitempty"` - WhitelistingEnabled bool `protobuf:"varint,13,opt,name=whitelisting_enabled,json=whitelistingEnabled,proto3" json:"whitelisting_enabled,omitempty"` - PerpetualSwapFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=perpetual_swap_fee,json=perpetualSwapFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"perpetual_swap_fee"` - MaxLimitOrder int64 `protobuf:"varint,15,opt,name=max_limit_order,json=maxLimitOrder,proto3" json:"max_limit_order,omitempty"` - FixedFundingRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=fixed_funding_rate,json=fixedFundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fixed_funding_rate"` - // minimum value for take_profit_price/current price for long, should be - // greater than 1 - MinimumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=minimum_long_take_profit_price_ratio,json=minimumLongTakeProfitPriceRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minimum_long_take_profit_price_ratio"` - // max value for take_profit_price/current price for long, should be greater - // than 1 - MaximumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,18,opt,name=maximum_long_take_profit_price_ratio,json=maximumLongTakeProfitPriceRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maximum_long_take_profit_price_ratio"` - // max value for take_profit_price/current price for short, should be less - // than 1 - MaximumShortTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,19,opt,name=maximum_short_take_profit_price_ratio,json=maximumShortTakeProfitPriceRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maximum_short_take_profit_price_ratio"` - // No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in - // validate message - EnableTakeProfitCustodyLiabilities bool `protobuf:"varint,20,opt,name=enable_take_profit_custody_liabilities,json=enableTakeProfitCustodyLiabilities,proto3" json:"enable_take_profit_custody_liabilities,omitempty"` - // We create this and send this value to estimate swap ONLY when opening and - // closing the position Ideally this value is set to half. When trader open a - // position if they receive a weight balance bonus (which is half of weight - // breaking fee, ideally) then while closing position they are charged weight - // breaking fee. So we just directly apply half weight breaking fee on - // perpetual swaps Question: does each need to have separate value of this - // because PoolParams.WeightRecoveryFeePortion can be different Also, if - // trader has no bonus only fee, then overall we are only applying the fee - // half time - WeightBreakingFeeFactor cosmossdk_io_math.LegacyDec `protobuf:"bytes,21,opt,name=weight_breaking_fee_factor,json=weightBreakingFeeFactor,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight_breaking_fee_factor"` - EnabledPools []uint64 `protobuf:"varint,22,rep,packed,name=enabled_pools,json=enabledPools,proto3" json:"enabled_pools,omitempty"` -} - -func (m *LegacyParams) Reset() { *m = LegacyParams{} } -func (m *LegacyParams) String() string { return proto.CompactTextString(m) } -func (*LegacyParams) ProtoMessage() {} -func (*LegacyParams) Descriptor() ([]byte, []int) { - return fileDescriptor_032040a5fba82242, []int{0} -} -func (m *LegacyParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LegacyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LegacyParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LegacyParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_LegacyParams.Merge(m, src) -} -func (m *LegacyParams) XXX_Size() int { - return m.Size() -} -func (m *LegacyParams) XXX_DiscardUnknown() { - xxx_messageInfo_LegacyParams.DiscardUnknown(m) -} - -var xxx_messageInfo_LegacyParams proto.InternalMessageInfo - -func (m *LegacyParams) GetMaxOpenPositions() int64 { - if m != nil { - return m.MaxOpenPositions - } - return 0 -} - -func (m *LegacyParams) GetLegacyBorrowInterestPaymentFundAddress() string { - if m != nil { - return m.LegacyBorrowInterestPaymentFundAddress - } - return "" -} - -func (m *LegacyParams) GetBorrowInterestPaymentEnabled() bool { - if m != nil { - return m.BorrowInterestPaymentEnabled - } - return false -} - -func (m *LegacyParams) GetWhitelistingEnabled() bool { - if m != nil { - return m.WhitelistingEnabled - } - return false -} - -func (m *LegacyParams) GetMaxLimitOrder() int64 { - if m != nil { - return m.MaxLimitOrder - } - return 0 -} - -func (m *LegacyParams) GetEnableTakeProfitCustodyLiabilities() bool { - if m != nil { - return m.EnableTakeProfitCustodyLiabilities - } - return false -} - -func (m *LegacyParams) GetEnabledPools() []uint64 { - if m != nil { - return m.EnabledPools - } - return nil -} - type Params struct { LeverageMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"` BorrowInterestRateMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=borrow_interest_rate_max,json=borrowInterestRateMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_max"` @@ -188,13 +64,14 @@ type Params struct { MinimumNotionalValue cosmossdk_io_math.LegacyDec `protobuf:"bytes,21,opt,name=minimum_notional_value,json=minimumNotionalValue,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minimum_notional_value"` LongMinimumLiabilityAmount cosmossdk_io_math.Int `protobuf:"bytes,22,opt,name=long_minimum_liability_amount,json=longMinimumLiabilityAmount,proto3,customtype=cosmossdk.io/math.Int" json:"long_minimum_liability_amount"` ExitBuffer cosmossdk_io_math.LegacyDec `protobuf:"bytes,23,opt,name=exit_buffer,json=exitBuffer,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"exit_buffer"` + NumberPerBlock uint64 `protobuf:"varint,24,opt,name=number_per_block,json=numberPerBlock,proto3" json:"number_per_block,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_032040a5fba82242, []int{1} + return fileDescriptor_032040a5fba82242, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -258,79 +135,78 @@ func (m *Params) GetEnabledPools() []uint64 { return nil } +func (m *Params) GetNumberPerBlock() uint64 { + if m != nil { + return m.NumberPerBlock + } + return 0 +} + func init() { - proto.RegisterType((*LegacyParams)(nil), "elys.perpetual.LegacyParams") proto.RegisterType((*Params)(nil), "elys.perpetual.Params") } func init() { proto.RegisterFile("elys/perpetual/params.proto", fileDescriptor_032040a5fba82242) } var fileDescriptor_032040a5fba82242 = []byte{ - // 968 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x98, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xb3, 0xb4, 0x84, 0x76, 0x62, 0x27, 0xce, 0xc4, 0x49, 0x17, 0x87, 0x3a, 0x56, 0x0a, - 0x21, 0x52, 0xa9, 0xad, 0x08, 0x89, 0x7b, 0x4d, 0x6a, 0x14, 0x91, 0x50, 0x6b, 0x1b, 0xf5, 0x00, - 0x87, 0xd1, 0x78, 0xf7, 0x79, 0x3d, 0x78, 0x77, 0x66, 0x35, 0x33, 0x8e, 0xed, 0x1b, 0xe2, 0xc2, - 0x95, 0x0f, 0xc3, 0x91, 0x33, 0xea, 0xb1, 0xe2, 0x84, 0x38, 0x54, 0x28, 0xf9, 0x22, 0x68, 0x76, - 0xd6, 0xae, 0x4b, 0xe2, 0x00, 0x4b, 0x43, 0x41, 0xca, 0xcd, 0x9e, 0x99, 0xf7, 0xfb, 0xff, 0x77, - 0xe7, 0xcd, 0x7b, 0xa3, 0x45, 0x9b, 0x10, 0x8d, 0x55, 0x23, 0x01, 0x99, 0x80, 0x1e, 0xd0, 0xa8, - 0x91, 0x50, 0x49, 0x63, 0x55, 0x4f, 0xa4, 0xd0, 0x02, 0x2f, 0x9b, 0xc9, 0xfa, 0x74, 0xb2, 0x52, - 0x0e, 0x45, 0x28, 0xd2, 0xa9, 0x86, 0xf9, 0x65, 0x57, 0x55, 0xde, 0xf5, 0x85, 0x8a, 0x85, 0x22, - 0x76, 0xc2, 0xfe, 0xb1, 0x53, 0xdb, 0x3f, 0x95, 0x50, 0xe1, 0x10, 0x42, 0xea, 0x8f, 0xdb, 0x29, - 0x17, 0x1f, 0xa3, 0x42, 0x04, 0x27, 0x20, 0x69, 0x08, 0x24, 0xa6, 0x23, 0xd7, 0xa9, 0x39, 0xbb, - 0xb7, 0x9b, 0x7b, 0xcf, 0x5e, 0x6c, 0x2d, 0xfc, 0xfa, 0x62, 0x6b, 0xd3, 0x06, 0xab, 0xa0, 0x5f, - 0x67, 0xa2, 0x11, 0x53, 0xdd, 0xab, 0xdb, 0xe8, 0x7d, 0xf0, 0x7f, 0xfe, 0xe1, 0x01, 0xca,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0x06, 0xae, 0x49, 0x77, 0xc0, 0x03, 0x92, 0x80, 0xf4, 0x81, 0x6b, - 0x1a, 0x82, 0x7b, 0x3b, 0xaf, 0x83, 0x7b, 0xaf, 0xee, 0x43, 0xdb, 0xf2, 0x5b, 0x03, 0x1e, 0xb4, - 0xa7, 0x74, 0xfc, 0x15, 0xba, 0x1f, 0xa5, 0xf1, 0xe4, 0x52, 0x3f, 0x34, 0x08, 0x24, 0x28, 0xe5, - 0x22, 0x63, 0xc6, 0xdb, 0xb1, 0x21, 0xcd, 0x79, 0xfc, 0x87, 0x76, 0x35, 0x7e, 0x8a, 0x8a, 0x8a, - 0x76, 0x41, 0x8f, 0x27, 0x1b, 0xbd, 0x94, 0xf7, 0x59, 0x0a, 0x96, 0x93, 0x6d, 0xf2, 0x23, 0xb4, - 0x35, 0xcf, 0x2d, 0x70, 0xda, 0x89, 0x20, 0x70, 0x0b, 0x35, 0x67, 0xf7, 0x96, 0xf7, 0xde, 0x85, - 0xaf, 0xe0, 0x91, 0x5d, 0x83, 0xf7, 0x50, 0x79, 0xd8, 0x63, 0x1a, 0x22, 0xa6, 0x34, 0xe3, 0xe1, - 0x34, 0xb6, 0x98, 0xc6, 0xae, 0xcd, 0xce, 0x4d, 0x42, 0x08, 0xc2, 0xd3, 0x42, 0x49, 0xd4, 0x90, - 0x26, 0xa4, 0x0b, 0xe0, 0x2e, 0xe7, 0xce, 0xdf, 0x29, 0xec, 0xc9, 0x90, 0x26, 0x2d, 0x00, 0xbc, - 0x83, 0x56, 0x6c, 0x32, 0xc6, 0x4c, 0x13, 0x21, 0x03, 0x90, 0xee, 0x4a, 0x9a, 0xbc, 0xc5, 0xd8, - 0xe4, 0x52, 0xcc, 0xf4, 0x63, 0x33, 0x68, 0x8c, 0x74, 0xd9, 0x08, 0x82, 0x74, 0x7b, 0x8c, 0x79, - 0x73, 0x78, 0xdd, 0x52, 0x6e, 0x23, 0x29, 0xac, 0x65, 0x59, 0xe6, 0xc4, 0xe2, 0x6f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x38, 0xf9, 0xa4, 0x31, 0x9a, 0xf9, 0x38, - 0xa3, 0xc7, 0x09, 0xa8, 0xce, 0x62, 0xfa, 0x6d, 0xe5, 0xe3, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x7e, 0x6d, 0x3f, 0x53, 0xbb, 0x11, 0x00, 0x00, + // 858 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0xc7, 0x63, 0x12, 0x42, 0x3b, 0x79, 0x69, 0x3a, 0x4d, 0xda, 0x61, 0x43, 0x37, 0x2b, 0xca, + 0xcb, 0x4a, 0xd0, 0x5d, 0x45, 0x48, 0xdc, 0x59, 0xa5, 0x8b, 0x22, 0x12, 0xba, 0x72, 0xa3, 0x1e, + 0xb8, 0x8c, 0xc6, 0xde, 0xc7, 0xf6, 0xb0, 0xf6, 0x8c, 0x35, 0x1e, 0x67, 0xbd, 0x37, 0xc4, 0x85, + 0x2b, 0x1f, 0x86, 0x0f, 0xd1, 0x63, 0xc5, 0x09, 0x71, 0xa8, 0x50, 0x22, 0xf1, 0x39, 0xd0, 0x78, + 0xc6, 0x4b, 0xa0, 0x09, 0x48, 0x56, 0x6e, 0xeb, 0xe7, 0xf1, 0xfc, 0xfe, 0x7f, 0xef, 0xf3, 0xa2, + 0x41, 0xfb, 0x90, 0x2e, 0x8a, 0x61, 0x0e, 0x2a, 0x07, 0x5d, 0xb2, 0x74, 0x98, 0x33, 0xc5, 0xb2, + 0x62, 0x90, 0x2b, 0xa9, 0x25, 0xde, 0x36, 0xc9, 0xc1, 0x32, 0xd9, 0xd9, 0x8d, 0x65, 0x2c, 0xeb, + 0xd4, 0xd0, 0xfc, 0xb2, 0x6f, 0x75, 0xde, 0x0f, 0x65, 0x91, 0xc9, 0x82, 0xda, 0x84, 0x7d, 0xb0, + 0xa9, 0x0f, 0xff, 0xbc,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x0d, 0x0e, 0x0b, 0xf4, 0xb8, 0x2e, 0xfe, 0xb2, 0x19, 0xdd, 0xce, 0x5b, + 0x50, 0x96, 0xc9, 0x52, 0x68, 0xf2, 0xb0, 0xd6, 0xfb, 0xcc, 0xe9, 0xed, 0xbd, 0xad, 0x77, 0x2c, + 0xf4, 0x15, 0xa5, 0x63, 0xa1, 0xfd, 0x8e, 0x21, 0x9e, 0xba, 0xf6, 0x6b, 0x78, 0x5f, 0xd5, 0x38, + 0xec, 0xa3, 0x0d, 0xa8, 0xb8, 0xa6, 0x41, 0x19, 0x45, 0xa0, 0xc8, 0xa3, 0xb6, 0x5f, 0x83, 0x0c, + 0x65, 0x54, 0x43, 0x70, 0x1f, 0xed, 0x88, 0x32, 0x0b, 0x40, 0x99, 0xdd, 0x4b, 0x83, 0x54, 0x86, + 0x33, 0x42, 0x7a, 0x5e, 0x7f, 0xcd, 0xdf, 0xb6, 0xf1, 0x09, 0xa8, 0x91, 0x89, 0x8e, 0xbe, 0x79, + 0x75, 0xd1, 0xf5, 0x5e, 0x5f, 0x74, 0xbd, 0x3f, 0x2e, 0xba, 0xde, 0xcf, 0x97, 0xdd, 0x95, 0xd7, + 0x97, 0xdd, 0x95, 0xdf, 0x2e, 0xbb, 0x2b, 0xdf, 0x1d, 0xc6, 0x5c, 0x27, 0x65, 0x30, 0x08, 0x65, + 0x36, 0x34, 0xd7, 0xa9, 0xa7, 0x02, 0xf4, 0x5c, 0xaa, 0x59, 0xfd, 0x30, 0x3c, 0xff, 0x72, 0x58, + 0x5d, 0xb9, 0x7d, 0xe9, 0x45, 0x0e, 0x45, 0xb0, 0x5e, 0x5f, 0x9e, 0xbe, 0xf8, 0x2b, 0x00, 0x00, + 0xff, 0xff, 0x01, 0xb4, 0x25, 0x98, 0x9c, 0x09, 0x00, 0x00, } -func (m *LegacyParams) Marshal() (dAtA []byte, err error) { +func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -340,76 +216,27 @@ func (m *LegacyParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LegacyParams) MarshalTo(dAtA []byte) (int, error) { +func (m *Params) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.EnabledPools) > 0 { - dAtA2 := make([]byte, len(m.EnabledPools)*10) - var j1 int - for _, num := range m.EnabledPools { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintParams(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - { - size := m.WeightBreakingFeeFactor.Size() - i -= size - if _, err := m.WeightBreakingFeeFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - if m.EnableTakeProfitCustodyLiabilities { - i-- - if m.EnableTakeProfitCustodyLiabilities { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.NumberPerBlock != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.NumberPerBlock)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xa0 - } - { - size := m.MaximumShortTakeProfitPriceRatio.Size() - i -= size - if _, err := m.MaximumShortTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) + dAtA[i] = 0xc0 } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a { - size := m.MaximumLongTakeProfitPriceRatio.Size() + size := m.ExitBuffer.Size() i -= size - if _, err := m.MaximumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.ExitBuffer.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -417,11 +244,11 @@ func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x92 + dAtA[i] = 0xba { - size := m.MinimumLongTakeProfitPriceRatio.Size() + size := m.LongMinimumLiabilityAmount.Size() i -= size - if _, err := m.MinimumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.LongMinimumLiabilityAmount.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -429,11 +256,11 @@ func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x8a + dAtA[i] = 0xb2 { - size := m.FixedFundingRate.Size() + size := m.MinimumNotionalValue.Size() i -= size - if _, err := m.FixedFundingRate.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.MinimumNotionalValue.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -441,1325 +268,301 @@ func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x82 - if m.MaxLimitOrder != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxLimitOrder)) - i-- - dAtA[i] = 0x78 - } - { - size := m.PerpetualSwapFee.Size() - i -= size - if _, err := m.PerpetualSwapFee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - if m.WhitelistingEnabled { - i-- - if m.WhitelistingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - if m.BorrowInterestPaymentEnabled { - i-- - if m.BorrowInterestPaymentEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0xaa + if len(m.EnabledPools) > 0 { + dAtA2 := make([]byte, len(m.EnabledPools)*10) + var j1 int + for _, num := range m.EnabledPools { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintParams(dAtA, i, uint64(j1)) i-- - dAtA[i] = 0x60 - } - { - size := m.SafetyFactor.Size() - i -= size - if _, err := m.SafetyFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - if len(m.LegacyBorrowInterestPaymentFundAddress) > 0 { - i -= len(m.LegacyBorrowInterestPaymentFundAddress) - copy(dAtA[i:], m.LegacyBorrowInterestPaymentFundAddress) - i = encodeVarintParams(dAtA, i, uint64(len(m.LegacyBorrowInterestPaymentFundAddress))) + dAtA[i] = 0x1 i-- - dAtA[i] = 0x52 + dAtA[i] = 0xa2 } { - size := m.BorrowInterestPaymentFundPercentage.Size() + size := m.WeightBreakingFeeFactor.Size() i -= size - if _, err := m.BorrowInterestPaymentFundPercentage.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.WeightBreakingFeeFactor.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x4a - { - size := m.PoolMaxLiabilitiesThreshold.Size() - i -= size - if _, err := m.PoolMaxLiabilitiesThreshold.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } + dAtA[i] = 0x1 i-- - dAtA[i] = 0x42 - if m.MaxOpenPositions != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxOpenPositions)) - i-- - dAtA[i] = 0x38 - } + dAtA[i] = 0x9a { - size := m.HealthGainFactor.Size() + size := m.MaximumShortTakeProfitPriceRatio.Size() i -= size - if _, err := m.HealthGainFactor.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.MaximumShortTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 - { - size := m.BorrowInterestRateDecrease.Size() - i -= size - if _, err := m.BorrowInterestRateDecrease.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } + dAtA[i] = 0x1 i-- - dAtA[i] = 0x2a + dAtA[i] = 0x92 { - size := m.BorrowInterestRateIncrease.Size() + size := m.MaximumLongTakeProfitPriceRatio.Size() i -= size - if _, err := m.BorrowInterestRateIncrease.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.MaximumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.BorrowInterestRateMin.Size() - i -= size - if _, err := m.BorrowInterestRateMin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.BorrowInterestRateMax.Size() - i -= size - if _, err := m.BorrowInterestRateMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.LeverageMax.Size() - i -= size - if _, err := m.LeverageMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.ExitBuffer.Size() - i -= size - if _, err := m.ExitBuffer.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - { - size := m.LongMinimumLiabilityAmount.Size() - i -= size - if _, err := m.LongMinimumLiabilityAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - { - size := m.MinimumNotionalValue.Size() - i -= size - if _, err := m.MinimumNotionalValue.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - if len(m.EnabledPools) > 0 { - dAtA4 := make([]byte, len(m.EnabledPools)*10) - var j3 int - for _, num := range m.EnabledPools { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintParams(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - { - size := m.WeightBreakingFeeFactor.Size() - i -= size - if _, err := m.WeightBreakingFeeFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - { - size := m.MaximumShortTakeProfitPriceRatio.Size() - i -= size - if _, err := m.MaximumShortTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - { - size := m.MaximumLongTakeProfitPriceRatio.Size() - i -= size - if _, err := m.MaximumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - { - size := m.MinimumLongTakeProfitPriceRatio.Size() - i -= size - if _, err := m.MinimumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - { - size := m.FixedFundingRate.Size() - i -= size - if _, err := m.FixedFundingRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if m.MaxLimitOrder != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxLimitOrder)) - i-- - dAtA[i] = 0x70 - } - { - size := m.PerpetualSwapFee.Size() - i -= size - if _, err := m.PerpetualSwapFee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - if m.WhitelistingEnabled { - i-- - if m.WhitelistingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if m.BorrowInterestPaymentEnabled { - i-- - if m.BorrowInterestPaymentEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - { - size := m.SafetyFactor.Size() - i -= size - if _, err := m.SafetyFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size := m.BorrowInterestPaymentFundPercentage.Size() - i -= size - if _, err := m.BorrowInterestPaymentFundPercentage.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size := m.PoolMaxLiabilitiesThreshold.Size() - i -= size - if _, err := m.PoolMaxLiabilitiesThreshold.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - if m.MaxOpenPositions != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxOpenPositions)) - i-- - dAtA[i] = 0x38 - } - { - size := m.HealthGainFactor.Size() - i -= size - if _, err := m.HealthGainFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.BorrowInterestRateDecrease.Size() - i -= size - if _, err := m.BorrowInterestRateDecrease.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.BorrowInterestRateIncrease.Size() - i -= size - if _, err := m.BorrowInterestRateIncrease.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.BorrowInterestRateMin.Size() - i -= size - if _, err := m.BorrowInterestRateMin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.BorrowInterestRateMax.Size() - i -= size - if _, err := m.BorrowInterestRateMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.LeverageMax.Size() - i -= size - if _, err := m.LeverageMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *LegacyParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.LeverageMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMin.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateIncrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateDecrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.HealthGainFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxOpenPositions != 0 { - n += 1 + sovParams(uint64(m.MaxOpenPositions)) - } - l = m.PoolMaxLiabilitiesThreshold.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestPaymentFundPercentage.Size() - n += 1 + l + sovParams(uint64(l)) - l = len(m.LegacyBorrowInterestPaymentFundAddress) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = m.SafetyFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.BorrowInterestPaymentEnabled { - n += 2 - } - if m.WhitelistingEnabled { - n += 2 - } - l = m.PerpetualSwapFee.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxLimitOrder != 0 { - n += 1 + sovParams(uint64(m.MaxLimitOrder)) - } - l = m.FixedFundingRate.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MinimumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumShortTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - if m.EnableTakeProfitCustodyLiabilities { - n += 3 - } - l = m.WeightBreakingFeeFactor.Size() - n += 2 + l + sovParams(uint64(l)) - if len(m.EnabledPools) > 0 { - l = 0 - for _, e := range m.EnabledPools { - l += sovParams(uint64(e)) - } - n += 2 + sovParams(uint64(l)) + l - } - return n -} - -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.LeverageMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMin.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateIncrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateDecrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.HealthGainFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxOpenPositions != 0 { - n += 1 + sovParams(uint64(m.MaxOpenPositions)) - } - l = m.PoolMaxLiabilitiesThreshold.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestPaymentFundPercentage.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.SafetyFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.BorrowInterestPaymentEnabled { - n += 2 - } - if m.WhitelistingEnabled { - n += 2 - } - l = m.PerpetualSwapFee.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxLimitOrder != 0 { - n += 1 + sovParams(uint64(m.MaxLimitOrder)) - } - l = m.FixedFundingRate.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.MinimumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumShortTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.WeightBreakingFeeFactor.Size() - n += 2 + l + sovParams(uint64(l)) - if len(m.EnabledPools) > 0 { - l = 0 - for _, e := range m.EnabledPools { - l += sovParams(uint64(e)) - } - n += 2 + sovParams(uint64(l)) + l - } - l = m.MinimumNotionalValue.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.LongMinimumLiabilityAmount.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.ExitBuffer.Size() - n += 2 + l + sovParams(uint64(l)) - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *LegacyParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LegacyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LegacyParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeverageMax", 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 - } - if err := m.LeverageMax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMax", 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 - } - if err := m.BorrowInterestRateMax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMin", 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 - } - if err := m.BorrowInterestRateMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateIncrease", 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 - } - if err := m.BorrowInterestRateIncrease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateDecrease", 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 - } - if err := m.BorrowInterestRateDecrease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthGainFactor", 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 - } - if err := m.HealthGainFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxOpenPositions", wireType) - } - m.MaxOpenPositions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxOpenPositions |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolMaxLiabilitiesThreshold", 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 - } - if err := m.PoolMaxLiabilitiesThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentFundPercentage", 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 - } - if err := m.BorrowInterestPaymentFundPercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LegacyBorrowInterestPaymentFundAddress", 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.LegacyBorrowInterestPaymentFundAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SafetyFactor", 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 - } - if err := m.SafetyFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BorrowInterestPaymentEnabled = bool(v != 0) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WhitelistingEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.WhitelistingEnabled = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerpetualSwapFee", 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 - } - if err := m.PerpetualSwapFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxLimitOrder", wireType) - } - m.MaxLimitOrder = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxLimitOrder |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedFundingRate", 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 - } - if err := m.FixedFundingRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumLongTakeProfitPriceRatio", 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 - } - if err := m.MinimumLongTakeProfitPriceRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumLongTakeProfitPriceRatio", 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 - } - if err := m.MaximumLongTakeProfitPriceRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumShortTakeProfitPriceRatio", 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 - } - if err := m.MaximumShortTakeProfitPriceRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableTakeProfitCustodyLiabilities", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableTakeProfitCustodyLiabilities = bool(v != 0) - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WeightBreakingFeeFactor", 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 - } - if err := m.WeightBreakingFeeFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnabledPools = append(m.EnabledPools, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.EnabledPools) == 0 { - m.EnabledPools = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnabledPools = append(m.EnabledPools, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field EnabledPools", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + { + size := m.MinimumLongTakeProfitPriceRatio.Size() + i -= size + if _, err := m.MinimumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size := m.FixedFundingRate.Size() + i -= size + if _, err := m.FixedFundingRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.MaxLimitOrder != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxLimitOrder)) + i-- + dAtA[i] = 0x70 + } + { + size := m.PerpetualSwapFee.Size() + i -= size + if _, err := m.PerpetualSwapFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + if m.WhitelistingEnabled { + i-- + if m.WhitelistingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.BorrowInterestPaymentEnabled { + i-- + if m.BorrowInterestPaymentEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + { + size := m.SafetyFactor.Size() + i -= size + if _, err := m.SafetyFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.BorrowInterestPaymentFundPercentage.Size() + i -= size + if _, err := m.BorrowInterestPaymentFundPercentage.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.PoolMaxLiabilitiesThreshold.Size() + i -= size + if _, err := m.PoolMaxLiabilitiesThreshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if m.MaxOpenPositions != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxOpenPositions)) + i-- + dAtA[i] = 0x38 + } + { + size := m.HealthGainFactor.Size() + i -= size + if _, err := m.HealthGainFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.BorrowInterestRateDecrease.Size() + i -= size + if _, err := m.BorrowInterestRateDecrease.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.BorrowInterestRateIncrease.Size() + i -= size + if _, err := m.BorrowInterestRateIncrease.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.BorrowInterestRateMin.Size() + i -= size + if _, err := m.BorrowInterestRateMin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.BorrowInterestRateMax.Size() + i -= size + if _, err := m.BorrowInterestRateMax.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.LeverageMax.Size() + i -= size + if _, err := m.LeverageMax.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintParams(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return nil + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeverageMax.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateMax.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateMin.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateIncrease.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateDecrease.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.HealthGainFactor.Size() + n += 1 + l + sovParams(uint64(l)) + if m.MaxOpenPositions != 0 { + n += 1 + sovParams(uint64(m.MaxOpenPositions)) + } + l = m.PoolMaxLiabilitiesThreshold.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestPaymentFundPercentage.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.SafetyFactor.Size() + n += 1 + l + sovParams(uint64(l)) + if m.BorrowInterestPaymentEnabled { + n += 2 + } + if m.WhitelistingEnabled { + n += 2 + } + l = m.PerpetualSwapFee.Size() + n += 1 + l + sovParams(uint64(l)) + if m.MaxLimitOrder != 0 { + n += 1 + sovParams(uint64(m.MaxLimitOrder)) + } + l = m.FixedFundingRate.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.MinimumLongTakeProfitPriceRatio.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.MaximumLongTakeProfitPriceRatio.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.MaximumShortTakeProfitPriceRatio.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.WeightBreakingFeeFactor.Size() + n += 2 + l + sovParams(uint64(l)) + if len(m.EnabledPools) > 0 { + l = 0 + for _, e := range m.EnabledPools { + l += sovParams(uint64(e)) + } + n += 2 + sovParams(uint64(l)) + l + } + l = m.MinimumNotionalValue.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.LongMinimumLiabilityAmount.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.ExitBuffer.Size() + n += 2 + l + sovParams(uint64(l)) + if m.NumberPerBlock != 0 { + n += 2 + sovParams(uint64(m.NumberPerBlock)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -2556,6 +1359,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberPerBlock", wireType) + } + m.NumberPerBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumberPerBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/perpetual/types/pool.pb.go b/x/perpetual/types/pool.pb.go index 1eb79ea19..8fd25ee25 100644 --- a/x/perpetual/types/pool.pb.go +++ b/x/perpetual/types/pool.pb.go @@ -213,9 +213,10 @@ type Pool struct { PoolAssetsShort []PoolAsset `protobuf:"bytes,6,rep,name=pool_assets_short,json=poolAssetsShort,proto3" json:"pool_assets_short"` LastHeightBorrowInterestRateComputed int64 `protobuf:"varint,7,opt,name=last_height_borrow_interest_rate_computed,json=lastHeightBorrowInterestRateComputed,proto3" json:"last_height_borrow_interest_rate_computed,omitempty"` // funding rate, if positive longs pay shorts, if negative shorts pay longs - FundingRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=funding_rate,json=fundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"funding_rate"` - FeesCollected []types.Coin `protobuf:"bytes,9,rep,name=fees_collected,json=feesCollected,proto3" json:"fees_collected"` - LeverageMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"` + FundingRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=funding_rate,json=fundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"funding_rate"` + FeesCollected []types.Coin `protobuf:"bytes,9,rep,name=fees_collected,json=feesCollected,proto3" json:"fees_collected"` + LeverageMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"` + AdlTriggerRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=adl_trigger_ratio,json=adlTriggerRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"adl_trigger_ratio"` } func (m *Pool) Reset() { *m = Pool{} } @@ -357,55 +358,57 @@ func init() { func init() { proto.RegisterFile("elys/perpetual/pool.proto", fileDescriptor_f2020803d9775cac) } var fileDescriptor_f2020803d9775cac = []byte{ - // 764 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0x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0xb1, 0x8b, 0xfc, - 0xea, 0xa2, 0xb9, 0x71, 0x8b, 0x2e, 0x4a, 0xdc, 0xcb, 0xab, 0xda, 0x64, 0xbe, 0x89, 0x51, 0x84, - 0xfb, 0x96, 0x1b, 0x70, 0x88, 0x80, 0x71, 0x51, 0x0d, 0x92, 0x47, 0x1e, 0xa3, 0x98, 0x12, 0xc3, - 0x35, 0x12, 0x34, 0x93, 0x72, 0x50, 0xb6, 0xc9, 0xac, 0x94, 0x5a, 0x76, 0xc6, 0x2c, 0x0f, 0x03, - 0x47, 0x9d, 0x5c, 0xce, 0xad, 0x96, 0x9e, 0x54, 0xf4, 0xf3, 0x3b, 0xad, 0x0f, 0xad, 0x5f, 0x2d, - 0x2f, 0x18, 0x98, 0xd3, 0x61, 0xff, 0x80, 0x6d, 0x62, 0xe0, 0x28, 0xaf, 0xc9, 0x5c, 0x1a, 0x90, - 0xb5, 0x31, 0xe2, 0x6a, 0x61, 0x14, 0xc4, 0x99, 0x01, 0xe2, 0x1b, 0x91, 0xad, 0xbc, 0x23, 0x8f, - 0x3c, 0xca, 0xb8, 0xd5, 0x06, 0xd7, 0x69, 0x73, 0xeb, 0x32, 0x51, 0x2c, 0x1b, 0xfd, 0xb0, 0xcb, - 0xa1, 0xa5, 0x4e, 0x2d, 0x67, 0x57, 0x73, 0xe6, 0x43, 0x91, 0xf0, 0x4a, 0xde, 0xaf, 0x5d, 0x68, - 0xba, 0x9e, 0xdc, 0x55, 0xde, 0x92, 0xff, 0x77, 0xbb, 0x41, 0xcb, 0x0d, 0x9c, 0x58, 0xd9, 0xff, - 0xc6, 0x55, 0xb6, 0x94, 0xc0, 0x48, 0x49, 0x5f, 0x92, 0xe9, 0x5d, 0x00, 0x66, 0x89, 0x19, 0x07, - 0x5b, 0x70, 0x2a, 0xca, 0xf6, 0xcb, 0x7a, 0x92, 0x21, 0x06, 0x4d, 0x4f, 0xec, 0x4f, 0xaf, 0xa3, - 0x1b, 0x24, 0x8d, 0xdf, 0x11,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, 0x05, 0xf9, 0xc7, 0xf3, 0xe9, 0xaf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xb1, 0x4f, 0x74, 0xe7, 0xf6, 0x0a, 0x00, 0x00, + // 792 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, + 0x14, 0x4e, 0x9a, 0x34, 0xb9, 0x99, 0xdc, 0xdb, 0x1f, 0xdf, 0x56, 0xd7, 0xe9, 0xa5, 0x4e, 0x15, + 0xb1, 0x28, 0x42, 0xb5, 0x15, 0x90, 0xd8, 0x93, 0x14, 0x44, 0xd4, 0x56, 0x2d, 0xa6, 0x12, 0x12, + 0x08, 0x8d, 0x26, 0xf6, 0xa9, 0x63, 0xc5, 0xf6, 0x18, 0xcf, 0xa4, 0x6d, 0x9e, 0x02, 0x1e, 0x86, + 0x0d, 0x6f, 0xd0, 0x65, 0xc5, 0x06, 0xc4, 0xa2, 0x42, 0xed, 0x96, 0x87, 0x40, 0x33, 0x76, 0x88, + 0x9b, 0xb6, 0xaa, 0x92, 0x02, 0xab, 0xee, 0x3c, 0x73, 0xe6, 0x7c, 0xe7, 0x3b, 0x7f, 0x9f, 0x8c, + 0x2a, 0xe0, 0xf5, 0x99, 0x11, 0x42, 0x14, 0x02, 0xef, 0x11, 0xcf, 0x08, 0x29, 0xf5, 0xf4, 0x30, + 0xa2, 0x9c, 0x2a, 0x33, 0xc2, 0xa4, 0xff, 0x34, 0x2d, 0x2d, 0x38, 0xd4, 0xa1, 0xd2, 0x64, 0x88, + 0xaf, 0xf8, 0xd5, 0x92, 0x66, 0x51, 0xe6, 0x53, 0x66, 0xb4, 0x09, 0x03, 0x63, 0xbf, 0xde, 0x06, + 0x4e, 0xea, 0x86, 0x45, 0xdd, 0x20, 0xb1, 0x57, 0x62, 0x3b, 0x8e, 0x1d, 0xe3, 0x43, 0x6c, 0xaa, + 0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0x10, 0x02, 0xb9, 0x59, 0x79, 0xb3, 0x24, 0x6f, 0xb6, 0x43, 0x08, 0x1a, 0x1b, 0x47, + 0xa7, 0x5a, 0xf6, 0xf8, 0x54, 0xcb, 0x7e, 0x3b, 0xd5, 0xb2, 0xef, 0xcf, 0xb4, 0xcc, 0xf1, 0x99, + 0x96, 0xf9, 0x72, 0xa6, 0x65, 0x5e, 0xd5, 0x1d, 0x97, 0x77, 0x7a, 0x6d, 0xdd, 0xa2, 0xbe, 0x21, + 0xc6, 0x6d, 0x2d, 0x00, 0x7e, 0x40, 0xa3, 0xae, 0x3c, 0x18, 0xfb, 0x8f, 0x8c, 0xc3, 0xd4, 0x6f, + 0x33, 0xef, 0x87, 0xc0, 0xda, 0x05, 0xf9, 0x5f, 0xfb, 0xf0, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xf3, 0x63, 0xd7, 0x8c, 0x55, 0x0b, 0x00, 0x00, } func (m *LegacyPoolAsset) Marshal() (dAtA []byte, err error) { @@ -693,6 +696,16 @@ func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.AdlTriggerRatio.Size() + i -= size + if _, err := m.AdlTriggerRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a { size := m.LeverageMax.Size() i -= size @@ -972,6 +985,8 @@ func (m *Pool) Size() (n int) { } l = m.LeverageMax.Size() n += 1 + l + sovPool(uint64(l)) + l = m.AdlTriggerRatio.Size() + n += 1 + l + sovPool(uint64(l)) return n } @@ -2134,6 +2149,40 @@ func (m *Pool) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdlTriggerRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + 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 ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AdlTriggerRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPool(dAtA[iNdEx:]) diff --git a/x/perpetual/types/query.pb.go b/x/perpetual/types/query.pb.go index 2ed5ea80b..2e215086a 100644 --- a/x/perpetual/types/query.pb.go +++ b/x/perpetual/types/query.pb.go @@ -509,8 +509,7 @@ func (m *PerpetualCounterResponse) GetResult() PerpetualCounter { } type PositionsForAddressRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` } func (m *PositionsForAddressRequest) Reset() { *m = PositionsForAddressRequest{} } @@ -553,16 +552,8 @@ func (m *PositionsForAddressRequest) GetAddress() string { return "" } -func (m *PositionsForAddressRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - type PositionsForAddressResponse struct { - Mtps []*MtpAndPrice `protobuf:"bytes,1,rep,name=mtps,proto3" json:"mtps,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Mtps []*MtpAndPrice `protobuf:"bytes,1,rep,name=mtps,proto3" json:"mtps,omitempty"` } func (m *PositionsForAddressResponse) Reset() { *m = PositionsForAddressResponse{} } @@ -605,13 +596,6 @@ func (m *PositionsForAddressResponse) GetMtps() []*MtpAndPrice { return nil } -func (m *PositionsForAddressResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - type WhitelistRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -1750,167 +1734,166 @@ func init() { func init() { proto.RegisterFile("elys/perpetual/query.proto", fileDescriptor_9a2c961615c1b7fe) } var fileDescriptor_9a2c961615c1b7fe = []byte{ - // 2550 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0x37, 0x45, 0x4a, 0x96, 0x1e, 0x7f, 0x88, 0x1a, 0xc9, 0x36, 0x45, 0x29, 0xb2, 0xb3, 0xb6, - 0x63, 0x3b, 0x8a, 0xc4, 0xaf, 0x14, 0x7f, 0x63, 0xa4, 0x6d, 0x1a, 0x48, 0x72, 0x95, 0x28, 0x91, - 0x1d, 0x96, 0x71, 0xea, 0xc2, 0x40, 0xba, 0x1d, 0x91, 0x23, 0x6a, 0xe1, 0xe5, 0xee, 0x7a, 0x77, - 0x68, 0x89, 0x16, 0x5c, 0xb4, 0x45, 0x0f, 0xbd, 0xb4, 0x68, 0x91, 0x02, 0xe9, 0xad, 0xb7, 0xa2, - 0xd7, 0x00, 0x45, 0x0b, 0x14, 0xe8, 0xa1, 0xe8, 0xa1, 0x39, 0x06, 0xed, 0xa5, 0xe8, 0x21, 0x28, - 0xec, 0xfe, 0x0d, 0x3d, 0x17, 0xf3, 0x63, 0x97, 0xbb, 0xcb, 0x25, 0x45, 0x2e, 0x29, 0xc4, 0x37, - 0x69, 0x77, 0xe6, 0xf3, 0x3e, 0xef, 0xc7, 0xbc, 0x7d, 0xef, 0x71, 0xa0, 0x48, 0xf4, 0x96, 0x53, - 0xb2, 0x88, 0x6d, 0x11, 0xda, 0xc4, 0x7a, 0xe9, 0x51, 0x93, 0xd8, 0xad, 0x55, 0xcb, 0x36, 0xa9, - 0x89, 0x72, 0xec, 0xdd, 0xaa, 0xf7, 0xae,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x1d, 0x21, 0x2d, 0xc0, 0xe7, 0x87, 0x09, 0x38, 0xef, 0xf1, - 0xd9, 0x6c, 0x95, 0x4d, 0x53, 0x77, 0x55, 0x5e, 0x82, 0x34, 0x6e, 0x34, 0x54, 0x96, 0xa2, 0x55, - 0xad, 0xc6, 0x75, 0x4e, 0x55, 0xa6, 0x70, 0xa3, 0xc1, 0x16, 0xed, 0xd4, 0x42, 0x26, 0x19, 0x8b, - 0x6d, 0x92, 0x4f, 0x12, 0x70, 0xa1, 0x83, 0xc2, 0x57, 0x6e, 0x98, 0x1b, 0x70, 0xa1, 0xec, 0xca, - 0xd9, 0x32, 0x9b, 0x2c, 0x2b, 0xba, 0x86, 0xc9, 0xc1, 0x98, 0x67, 0x8f, 0x31, 0xad, 0xa6, 0x3c, - 0x80, 0x42, 0xe7, 0x52, 0xa9, 0xc0, 0x37, 0x61, 0xc2, 0x26, 0x4e, 0x53, 0xa7, 0x32, 0x66, 0x2e, - 0x75, 0x44, 0x60, 0x68, 0xa7, 0x1b, 0x8b, 0x62, 0x97, 0xf2, 0x03, 0x28, 0x7a, 0xb6, 0xd9, 0x36, - 0xed, 0x8d, 0x5a, 0xcd, 0x26, 0x8e, 0x17, 0x95, 0x05, 0x38, 0x8b, 0xc5, 0x13, 0xf1, 0x79, 0xab, - 0xb8, 0xff, 0x8e, 0xcc, 0x39, 0x9f, 0x26, 0x60, 0x21, 0x92, 0xc0, 0x57, 0xee, 0xa0, 0x07, 0x90, - 0xbf, 0x7f, 0xa0, 0x51, 0xa2, 0x6b, 0x0e, 0x1d, 0xf5, 0x29, 0x7d, 0x02, 0x33, 0x3e, 0x6c, 0xa9, - 0xea, 0x22, 0x4c, 0x1d, 0xba, 0x0f, 0xb9, 0xbe, 0x53, 0x95, 0xf6, 0x83, 0xd1, 0xe9, 0xf5, 0x7f, - 0x30, 0xb7, 0xe3, 0x78, 0xd2, 0x49, 0xed, 0x44, 0x5f, 0x2b, 0xdf, 0x85, 0x73, 0xa1, 0x1d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ad, 0x9a, 0x8d, 0x08, 0xe8, 0xc7, 0x6f, 0x94, 0x8e, 0xc2, - 0x97, 0xe4, 0xf7, 0x26, 0xf8, 0x7d, 0xf6, 0xd7, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x68, - 0x90, 0x8c, 0xec, 0x2f, 0x00, 0x00, + // 2544 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x6f, 0x1b, 0xd7, + 0x11, 0x37, 0x45, 0x4a, 0x96, 0x86, 0x1f, 0x12, 0x9f, 0x64, 0x9b, 0xa2, 0x14, 0xd9, 0x59, 0xdb, + 0xb1, 0x1d, 0x45, 0x64, 0xa5, 0xb8, 0x36, 0xd2, 0x36, 0x0d, 0x24, 0xb9, 0x4a, 0x94, 0xc8, 0x0e, + 0xcb, 0x38, 0x75, 0x61, 0x20, 0xdd, 0x3e, 0x91, 0x4f, 0xd4, 0xc2, 0xcb, 0xdd, 0xf5, 0xee, 0xa3, + 0x24, 0x5a, 0x10, 0x50, 0x14, 0x3d, 0xf4, 0xd2, 0xa2, 0x45, 0x0a, 0xb4, 0xb7, 0xde, 0x8a, 0x5e, + 0x53, 0x14, 0x2d, 0x50, 0xa0, 0x87, 0x9e, 0x9a, 0x63, 0xd0, 0x5e, 0x8a, 0x1e, 0x82, 0xc2, 0xee, + 0x1f, 0xd0, 0x53, 0xcf, 0xc5, 0xfb, 0xd8, 0xe5, 0xee, 0xf2, 0x43, 0xe4, 0x92, 0x42, 0x7d, 0x93, + 0x76, 0xdf, 0xfc, 0xe6, 0xf7, 0x66, 0xe6, 0xcd, 0xce, 0x0c, 0x1f, 0xe4, 0x89, 0xde, 0x74, 0x8a, + 0x16, 0xb1, 0x2d, 0x42, 0x1b, 0x58, 0x2f, 0x3e, 0x6d, 0x10, 0xbb, 0x59, 0xb0, 0x6c, 0x93, 0x9a, + 0x28, 0xc3,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 0xc8, + 0xc5, 0xcc, 0x12, 0x05, 0x79, 0x3e, 0x0a, 0x9b, 0xa6, 0x66, 0x6c, 0x24, 0x98, 0xb6, 0x32, 0x5b, + 0x8b, 0xbe, 0x0f, 0x88, 0xec, 0xed, 0x91, 0x0a, 0xd5, 0x0e, 0x88, 0xaa, 0x93, 0x03, 0x62, 0xe3, + 0x1a, 0x91, 0xae, 0x89, 0x42, 0xca, 0x03, 0xdb, 0x91, 0x58, 0xe8, 0x7b, 0x90, 0x15, 0x9e, 0xe7, + 0xf9, 0x40, 0xee, 0x7a, 0x3c, 0xaa, 0x82, 0x19, 0x1f, 0x96, 0xd8, 0xf4, 0x4d, 0x48, 0x30, 0x87, + 0xe7, 0x26, 0xf8, 0xae, 0xe7, 0xc2, 0xf6, 0x67, 0xee, 0x2b, 0xf3, 0x15, 0xca, 0x34, 0xa4, 0x4b, + 0x3c, 0xef, 0x94, 0xc9, 0xd3, 0x06, 0x71, 0xa8, 0xb2, 0x05, 0x19, 0xf7, 0x81, 0x63, 0x99, 0x86, + 0x43, 0xd0, 0x6d, 0x98, 0x10, 0xa9, 0x49, 0xba, 0xf3, 0x62, 0x18, 0x4e, 0xac, 0x97, 0x16, 0x94, + 0x6b, 0x95, 0xc7, 0x30, 0x53, 0x32, 0x1d, 0x8d, 0x27, 0x47, 0x89, 0x8d, 0xb6, 0x00, 0x5a, 0x59, + 0x50, 0xa2, 0xbd, 0x16, 0x70, 0x89, 0xc8, 0xc7, 0xae, 0x63, 0x4a, 0xb8, 0x46, 0xa4, 0x6c, 0xd9, + 0x27, 0xa9, 0xfc, 0x24, 0x06, 0x59, 0x1f, 0xb8, 0xe4, 0x59, 0x84, 0x44, 0x9d, 0x5a, 0x8c, 0x65, + 0xfc, 0x66, 0x72, 0x6d, 0xa1, 0x2d, 0xe8, 0x5a, 0xe1, 0x59, 0xe6, 0x0b, 0xd1, 0xbb, 0x01, 0x3a, + 0x63, 0x9c, 0xce, 0x8d, 0x53, 0xe9, 0x08, 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xe2, 0x13, 0xf1, 0x5b, 0x39, 0x11, 0xb4, 0xf2, 0x27, 0x90, 0xa5, 0xf8, + 0x09, 0x61, 0x55, 0xfe, 0x9e, 0x46, 0x87, 0x2d, 0x2f, 0xa6, 0x19, 0x56, 0x89, 0x43, 0x89, 0xea, + 0xe2, 0x22, 0x48, 0x2f, 0xf1, 0xfa, 0xc2, 0xf3, 0x19, 0x2a, 0x43, 0x52, 0xd7, 0xea, 0x9e, 0xc2, + 0xf3, 0x51, 0x15, 0x02, 0x47, 0xe1, 0xba, 0x94, 0xdf, 0xa4, 0x61, 0xa1, 0xa3, 0x27, 0xbd, 0xe2, + 0x24, 0x8a, 0x2b, 0x3b, 0x57, 0x78, 0x63, 0x23, 0xac, 0xf0, 0xae, 0x42, 0x3a, 0x50, 0xd9, 0x8a, + 0x66, 0xa2, 0x9c, 0xf2, 0x17, 0xa8, 0xa1, 0x10, 0x48, 0x0c, 0x1e, 0x02, 0x15, 0x98, 0xdb, 0x37, + 0x1b, 0xb6, 0xde, 0x6c, 0xf5, 0x31, 0x36, 0xa6, 0x43, 0xf8, 0x1a, 0x09, 0x38, 0xb7, 0x7f, 0x29, + 0x63, 0x4a, 0xd0, 0x3d, 0x48, 0xbb, 0x86, 0x53, 0x1d, 0xed, 0x19, 0x91, 0x55, 0xe5, 0xa9, 0x44, + 0x53, 0xae, 0xd4, 0x47, 0xda, 0x33, 0x82, 0x4a, 0x00, 0xa6, 0x45, 0x8c, 0x61, 0x63, 0x63, 0x8a, + 0x81, 0x88, 0x30, 0xec, 0x18, 0xe5, 0x93, 0x23, 0x8b, 0xf2, 0x8e, 0x35, 0xfa, 0xd4, 0xe8, 0x6a, + 0xf4, 0x7b, 0x90, 0x26, 0x22, 0x9e, 0x49, 0x55, 0x65, 0x2d, 0x0a, 0xf4, 0x69, 0x56, 0x4f, 0xaa, + 0x64, 0xe8, 0xa8, 0x04, 0xb3, 0xf8, 0x00, 0x6b, 0x3a, 0xde, 0xd5, 0x49, 0xab, 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14, 0x8f, 0xc2, 0x37, 0xd0, 0x77, 0x27, 0xf8, 0x65, + 0xf1, 0x37, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xac, 0x35, 0xc5, 0x4b, 0x49, 0x2f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2386,7 +2369,6 @@ func _Query_OpenEstimationByFinal_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.perpetual.Query", HandlerType: (*QueryServer)(nil), @@ -2918,18 +2900,6 @@ func (m *PositionsForAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) @@ -2960,18 +2930,6 @@ func (m *PositionsForAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } if len(m.Mtps) > 0 { for iNdEx := len(m.Mtps) - 1; iNdEx >= 0; iNdEx-- { { @@ -4534,10 +4492,6 @@ func (m *PositionsForAddressRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -4553,10 +4507,6 @@ func (m *PositionsForAddressResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -6236,42 +6186,6 @@ func (m *PositionsForAddressRequest) Unmarshal(dAtA []byte) error { } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6356,42 +6270,6 @@ func (m *PositionsForAddressResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/perpetual/types/query.pb.gw.go b/x/perpetual/types/query.pb.gw.go index 64590286c..fe2a6d51d 100644 --- a/x/perpetual/types/query.pb.gw.go +++ b/x/perpetual/types/query.pb.gw.go @@ -271,10 +271,6 @@ func local_request_Query_PerpetualCounter_0(ctx context.Context, marshaler runti } -var ( - filter_Query_GetPositionsForAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0, "pagination": 1, "key": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 3, 2, 4}} -) - func request_Query_GetPositionsForAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq PositionsForAddressRequest var metadata runtime.ServerMetadata @@ -297,24 +293,6 @@ func request_Query_GetPositionsForAddress_0(ctx context.Context, marshaler runti return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } - val, ok = pathParams["pagination.key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pagination.key") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "pagination.key", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pagination.key", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetPositionsForAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.GetPositionsForAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -342,24 +320,6 @@ func local_request_Query_GetPositionsForAddress_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } - val, ok = pathParams["pagination.key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pagination.key") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "pagination.key", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pagination.key", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetPositionsForAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.GetPositionsForAddress(ctx, &protoReq) return msg, metadata, err @@ -1455,7 +1415,7 @@ var ( pattern_Query_PerpetualCounter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "perpetual", "counter", "id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetPositionsForAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"elys-network", "elys", "perpetual", "mtps-for-address", "address", "pagination.key"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetPositionsForAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "perpetual", "mtps-for-address", "address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetWhitelist_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"elys-network", "elys", "perpetual", "whitelist", "pagination.key"}, "", runtime.AssumeColonVerbOpt(false))) diff --git a/x/perpetual/types/tx.pb.go b/x/perpetual/types/tx.pb.go index 4982e7c75..0f165b1db 100644 --- a/x/perpetual/types/tx.pb.go +++ b/x/perpetual/types/tx.pb.go @@ -149,10 +149,11 @@ func (m *MsgOpenResponse) GetId() uint64 { } type MsgClose struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - PoolId uint64 `protobuf:"varint,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Amount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` + PoolId uint64 `protobuf:"varint,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + ClosingRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=closing_ratio,json=closingRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"closing_ratio"` } func (m *MsgClose) Reset() { *m = MsgClose{} } @@ -1148,87 +1149,88 @@ func init() { func init() { proto.RegisterFile("elys/perpetual/tx.proto", fileDescriptor_5e879ed5011cdd71) } var fileDescriptor_5e879ed5011cdd71 = []byte{ - // 1273 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x5f, 0x6f, 0xdb, 0xd4, - 0x1b, 0xae, 0x93, 0xb4, 0x4d, 0xde, 0xb4, 0xd9, 0xaf, 0xfe, 0x6d, 0xad, 0xeb, 0x40, 0x92, 0x7a, - 0x0c, 0xb2, 0x95, 0xc6, 0x34, 0x43, 0x13, 0xea, 0x0d, 0xac, 0x19, 0x43, 0x13, 0x8b, 0x56, 0x65, - 0x9b, 0xf8, 0x27, 0x88, 0x4e, 0xe3, 0x83, 0x6b, 0xe6, 0xf8, 0x78, 0x3e, 0x4e, 0xd7, 0x4a, 0x5c, - 0x20, 0x2e, 0xb9, 0x82, 0xaf, 0xc0, 0x05, 0xdc, 0xee, 0x62, 0x9f, 0x01, 0xed, 0x72, 0xec, 0x0a, - 0x71, 0x31, 0xa1, 0x0d, 0xa9, 0x7c, 0x01, 0x6e, 0xb8, 0x40, 0xc8, 0xf6, 0xf1, 0x89, 0xed, 0xd8, - 0xeb, 0x16, 0x4d, 0x48, 0xdc, 0x6c, 0xf6, 0x79, 0x9e, 0xf3, 0x9c, 0xf7, 0x7d, 0x8e, 0xcf, 0x7b, - 0xde, 0x06, 0x56, 0xb0, 0x79, 0x48, 0x55, 0x1b, 0x3b, 0x36, 0x76, 0x47, 0xc8, 0x54, 0xdd, 0x83, - 0x96, 0xed, 0x10, 0x97, 0x88, 0x15, 0x0f, 0x68, 0x71, 0x40, 0x3e, 0xa9, 0x13, 0x9d, 0xf8, 0x90, - 0xea, 0x3d, 0x05, 0x2c, 0xb9, 0x36, 0x20, 0x74, 0x48, 0xa8, 0xba, 0x8b, 0x28, 0x56, 0xf7, 0x37, - 0x77, 0xb1, 0x8b, 0x36, 0xd5, 0x01, 0x31, 0x2c, 0x86, 0x57, 0x13, 0xf2, 0x36, 0x72, 0xd0, 0x90, - 0x32, 0x50, 0x4e, 0xae, 0x7d, 0x68, 0xe3, 0x10, 0x5b, 0x61, 0xc2, 0x43, 0xaa, 0xab, 0xfb, 0x9b, - 0xde, 0x7f, 0x0c, 0x58, 0x42, 0x43, 0xc3, 0x22, 0xaa, 0xff, 0x2f, 0x1b, 0x5a, 0x0d, 0xb8, 0xfd, - 0x20, 0xba, 0xe0, 0x25, 0x80, 0x94, 0xbf, 0xf2, 0x30, 0xdf, 0xa5, 0xfa, 0x35, 0x1b, 0x5b, 0x62, - 0x1b, 0xe6, 0x07, 0x0e, 0x46, 0x2e, 0x71, 0x24, 0xa1, 0x21, 0x34, 0x4b, 0xdb, 0xd2, 0xc3, 0x7b, - 0x1b, 0x27, 0x19, 0xfd, 0xa2, 0xa6, 0x39, 0x98, 0xd2, 0xeb, 0xae, 0x63, 0x58,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 0xe5, - 0xf3, 0xcf, 0x41, 0xe6, 0xab, 0x7f, 0x01, 0x62, 0x4a, 0xad, 0x3e, 0x93, 0x29, 0x15, 0xa5, 0xc9, - 0x1b, 0xcf, 0x44, 0x0b, 0xd7, 0x92, 0x67, 0xbf, 0x3a, 0xba, 0x7b, 0x4e, 0xd8, 0x7e, 0xff, 0xfe, - 0xe3, 0x9a, 0xf0, 0xe0, 0x71, 0x4d, 0xf8, 0xed, 0x71, 0x4d, 0xf8, 0xf6, 0x49, 0x6d, 0xe6, 0xc1, - 0x93, 0xda, 0xcc, 0x2f, 0x4f, 0x6a, 0x33, 0x1f, 0x6f, 0xea, 0x86, 0xbb, 0x37, 0xda, 0x6d, 0x0d, - 0xc8, 0x50, 0xf5, 0x94, 0x37, 0x2c, 0xec, 0xde, 0x21, 0xce, 0x2d, 0xff, 0x45, 0xdd, 0xbf, 0xa0, - 0x1e, 0x24, 0x7f, 0x0f, 0xd9, 0x9d, 0xf3, 0x7f, 0xc9, 0x38, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x60, 0x46, 0xef, 0x25, 0xaa, 0x11, 0x00, 0x00, + // 1293 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0x8e, 0x77, 0x37, 0xbf, 0xde, 0x26, 0x29, 0x31, 0x6d, 0xe2, 0x38, 0xb0, 0xd9, 0xb8, 0x14, + 0xb6, 0x0d, 0x59, 0x93, 0x2d, 0xaa, 0x50, 0x2e, 0xd0, 0xa4, 0x14, 0x55, 0x74, 0xd5, 0xc8, 0x6d, + 0xf9, 0x29, 0x58, 0x4d, 0xd6, 0x83, 0x63, 0xea, 0xf5, 0xb8, 0x9e, 0x49, 0x9a, 0x48, 0x1c, 0x10, + 0x47, 0x4e, 0xf0, 0x2f, 0x70, 0x00, 0x71, 0xeb, 0xa1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0xe1, 0x54, 0xfe, 0xe5, 0xd7, 0x28, + 0x8c, 0x31, 0xc3, 0x54, 0xdf, 0x78, 0x56, 0xa6, 0x58, 0xf4, 0x2b, 0x50, 0x0a, 0x6f, 0x95, 0x95, + 0x42, 0xb5, 0x41, 0xb2, 0x7a, 0xfe, 0x18, 0x64, 0xb1, 0xfa, 0x97, 0x20, 0xe7, 0xd4, 0xea, 0x33, + 0x85, 0x52, 0x49, 0x9a, 0xba, 0xfa, 0x4c, 0xb4, 0x78, 0x2d, 0x75, 0xf4, 0xeb, 0xc3, 0xbb, 0xe7, + 0xa4, 0x8d, 0xf7, 0xef, 0x3f, 0xae, 0x49, 0x0f, 0x1e, 0xd7, 0xa4, 0xdf, 0x1f, 0xd7, 0xa4, 0xef, + 0x9e, 0xd4, 0x46, 0x1e, 0x3c, 0xa9, 0x8d, 0xfc, 0xfa, 0xa4, 0x36, 0xf2, 0xc9, 0x9a, 0x65, 0xb3, + 0x9d, 0xdd, 0xed, 0x66, 0x97, 0xf4, 0xf4, 0x40, 0x79, 0xd5, 0xc5, 0xec, 0x0e, 0xf1, 0x6f, 0x85, + 0x2f, 0xfa, 0xde, 0x05, 0x7d, 0x3f, 0xfb, 0x3b, 0xcb, 0xf6, 0x58, 0xf8, 0x0b, 0xc9, 0xf9, 0x7f, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xd6, 0xab, 0xb5, 0x02, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1618,7 +1620,6 @@ func _Msg_UpdateEnabledPools_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.perpetual.Msg", HandlerType: (*MsgServer)(nil), @@ -1800,6 +1801,16 @@ func (m *MsgClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.ClosingRatio.Size() + i -= size + if _, err := m.ClosingRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a if m.PoolId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) i-- @@ -2610,6 +2621,8 @@ func (m *MsgClose) Size() (n int) { if m.PoolId != 0 { n += 1 + sovTx(uint64(m.PoolId)) } + l = m.ClosingRatio.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -3368,6 +3381,40 @@ func (m *MsgClose) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClosingRatio", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ClosingRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/perpetual/types/types.pb.go b/x/perpetual/types/types.pb.go index f928ec897..d0547a7f7 100644 --- a/x/perpetual/types/types.pb.go +++ b/x/perpetual/types/types.pb.go @@ -410,6 +410,66 @@ func (m *PositionRequest) GetPoolId() uint64 { return 0 } +type ADLCounter struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + Counter uint64 `protobuf:"varint,2,opt,name=counter,proto3" json:"counter,omitempty"` + NextKey []byte `protobuf:"bytes,3,opt,name=next_key,json=nextKey,proto3" json:"next_key,omitempty"` +} + +func (m *ADLCounter) Reset() { *m = ADLCounter{} } +func (m *ADLCounter) String() string { return proto.CompactTextString(m) } +func (*ADLCounter) ProtoMessage() {} +func (*ADLCounter) Descriptor() ([]byte, []int) { + return fileDescriptor_137aedba6573a752, []int{5} +} +func (m *ADLCounter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ADLCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ADLCounter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ADLCounter) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADLCounter.Merge(m, src) +} +func (m *ADLCounter) XXX_Size() int { + return m.Size() +} +func (m *ADLCounter) XXX_DiscardUnknown() { + xxx_messageInfo_ADLCounter.DiscardUnknown(m) +} + +var xxx_messageInfo_ADLCounter proto.InternalMessageInfo + +func (m *ADLCounter) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *ADLCounter) GetCounter() uint64 { + if m != nil { + return m.Counter + } + return 0 +} + +func (m *ADLCounter) GetNextKey() []byte { + if m != nil { + return m.NextKey + } + return nil +} + func init() { proto.RegisterEnum("elys.perpetual.Position", Position_name, Position_value) proto.RegisterType((*MTP)(nil), "elys.perpetual.MTP") @@ -417,74 +477,77 @@ func init() { proto.RegisterType((*FundingRateBlock)(nil), "elys.perpetual.FundingRateBlock") proto.RegisterType((*WhiteList)(nil), "elys.perpetual.WhiteList") proto.RegisterType((*PositionRequest)(nil), "elys.perpetual.PositionRequest") + proto.RegisterType((*ADLCounter)(nil), "elys.perpetual.ADLCounter") } func init() { proto.RegisterFile("elys/perpetual/types.proto", fileDescriptor_137aedba6573a752) } var fileDescriptor_137aedba6573a752 = []byte{ - // 979 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x5b, 0x6f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, 0x4e, 0xa8, 0x9b, 0xe3, - 0x9d, 0x50, 0xd7, 0x2e, 0xfa, 0x2a, 0x3c, 0xd7, 0x0c, 0xf4, 0x39, 0xac, 0x86, 0x42, 0x32, 0xc5, - 0x44, 0x80, 0x4b, 0x75, 0xeb, 0xb0, 0xfc, 0x18, 0x37, 0x26, 0x1f, 0x4c, 0xa3, 0x93, 0xf8, 0xed, - 0x71, 0x24, 0x2a, 0xc3, 0x22, 0xf3, 0x70, 0xb9, 0x6e, 0x1d, 0x2e, 0xd9, 0x8b, 0xcc, 0x43, 0x35, - 0x58, 0x23, 0xbe, 0xef, 0x84, 0x42, 0x70, 0x87, 0x79, 0xb8, 0xa2, 0x1d, 0x45, 0xe2, 0xfb, 0x1d, - 0x21, 0x78, 0xcb, 0x43, 0xaf, 0x60, 0x43, 0x91, 0x2b, 0x1a, 0xbf, 0xae, 0x1e, 0x53, 0x4e, 0x18, - 0x31, 0x97, 0xe2, 0xea, 0xbc, 0xe5, 0x57, 0x62, 0x56, 0x47, 0xa3, 0x3a, 0x31, 0x09, 0x71, 0xd8, - 0xcb, 0xe3, 0x93, 0xf9, 0xf6, 0x88, 0xab, 0x44, 0x84, 0x37, 0xe6, 0x95, 0xd9, 0xc9, 0x64, 0x8e, - 0x34, 0xf1, 0x4c, 0x03, 0x91, 0x07, 0xb8, 0x37, 0x0c, 0xf4, 0x13, 0xee, 0x51, 0x3a, 0x79, 0x57, - 0xd1, 0xec, 0xc3, 0xdd, 0x4e, 0x60, 0x67, 0x94, 0xe6, 0xef, 0x29, 0x87, 0xbb, 0x79, 0x95, 0x88, - 0xba, 0x94, 0x5d, 0xd3, 0x4c, 0x69, 0x73, 0x8e, 0x57, 0x91, 0x29, 0xd9, 0x09, 0xee, 0x38, 0xbb, - 0x58, 0x22, 0xa4, 0x41, 0x32, 0x99, 0xad, 0xb9, 0x2f, 0x56, 0x0c, 0x31, 0x33, 0xf9, 0x1e, 0x2a, - 0x52, 0x89, 0xd0, 0xe1, 0x42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0x16, 0x7e, 0x78, 0xd4, 0x67, 0x6a, 0x30, 0xec, 0x36, 0x5c, 0xe1, 0x37, 0xe3, 0x25, 0xf7, 0x30, - 0xa0, 0xea, 0xb5, 0x88, 0xae, 0xf4, 0x9f, 0xe6, 0xf5, 0x97, 0xcd, 0x9f, 0xa6, 0xbf, 0x21, 0xbb, - 0xcb, 0xfa, 0x1b, 0xf0, 0xc9, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x60, 0xf7, 0x5f, 0x96, 0x62, - 0x0a, 0x00, 0x00, + // 1019 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x5b, 0x6f, 0xdb, 0x36, + 0x14, 0xc7, 0xa3, 0x38, 0x37, 0x9f, 0xd8, 0xb1, 0xc3, 0xdc, 0x98, 0xac, 0x75, 0xb3, 0x0c, 0x03, + 0xb2, 0x15, 0xb5, 0xd7, 0x76, 0x97, 0xe7, 0xe6, 0xb6, 0x18, 0x71, 0x5b, 0x43, 0x49, 0x37, 0xac, + 0x40, 0x21, 0x30, 0x12, 0x63, 0x13, 0xa1, 0x44, 0x4d, 0xa4, 0xd3, 0xfa, 0x5b, 0xec, 0x6b, 0xec, + 0x7d, 0x1f, 0xa2, 0x8f, 0xc5, 0x9e, 0x8a, 0x3d, 0x14, 0x43, 0xf2, 0xb6, 0x4f, 0x31, 0x90, 0x94, + 0x2c, 0x25, 0x1b, 0x36, 0xc4, 0x7d, 0x13, 0xcf, 0xe5, 0xf7, 0x3f, 0x87, 0x17, 0x1c, 0xc1, 0x06, + 0xe5, 0x43, 0xd9, 0x8a, 0x69, 0x12, 0x53, 0x35, 0x20, 0xbc, 0xa5, 0x86, 0x31, 0x95, 0xcd, 0x38, + 0x11, 0x4a, 0xa0, 0x05, 0xed, 0x6b, 0x8e, 0x7c, 0x1b, 0xcb, 0x3d, 0xd1, 0x13, 0xc6, 0xd5, 0xd2,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x47, 0xc9, 0x18, 0x67, 0x62, 0x33, 0x3a, 0xb6, + 0x5e, 0x02, 0x3c, 0xd9, 0xeb, 0xec, 0x8a, 0x81, 0xbe, 0xbb, 0xc5, 0x30, 0xa7, 0x18, 0xa6, 0x95, + 0x7c, 0x1b, 0x93, 0x42, 0xb3, 0x25, 0x5a, 0x87, 0xb9, 0x88, 0xbe, 0x51, 0xde, 0x39, 0x1d, 0x1a, + 0x74, 0xc5, 0x9d, 0xd5, 0xeb, 0x23, 0x3a, 0xfc, 0xf2, 0x2b, 0x98, 0xcb, 0x2a, 0x46, 0x35, 0x98, + 0x7f, 0xf1, 0xec, 0xb8, 0xbb, 0xbf, 0xdb, 0x3e, 0x68, 0xef, 0xef, 0xd5, 0x27, 0xd0, 0x1c, 0x4c, + 0x75, 0x9e, 0x3f, 0xfb, 0xbe, 0xee, 0xa0, 0x32, 0x4c, 0x1f, 0x1f, 0x3e, 0x77, 0x4f, 0xea, 0x93, + 0x3b, 0x47, 0x6f, 0x2f, 0x1b, 0xce, 0xbb, 0xcb, 0x86, 0xf3, 0xe7, 0x65, 0xc3, 0xf9, 0xe5, 0xaa, + 0x31, 0xf1, 0xee, 0xaa, 0x31, 0xf1, 0xfe, 0xaa, 0x31, 0xf1, 0xf2, 0x61, 0x8f, 0xa9, 0xfe, 0xe0, + 0xb4, 0xe9, 0x8b, 0xb0, 0xa5, 0x07, 0xe8, 0x83, 0x88, 0xaa, 0xd7, 0x22, 0x39, 0x37, 0x8b, 0xd6, + 0xc5, 0xb7, 0xad, 0x37, 0x37, 0xff, 0x4f, 0x4f, 0x67, 0xcc, 0xff, 0xe5, 0xe3, 0xbf, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x60, 0x44, 0x19, 0x5e, 0xbe, 0x0a, 0x00, 0x00, } func (m *MTP) Marshal() (dAtA []byte, err error) { @@ -908,6 +971,46 @@ func (m *PositionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ADLCounter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ADLCounter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ADLCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NextKey) > 0 { + i -= len(m.NextKey) + copy(dAtA[i:], m.NextKey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextKey))) + i-- + dAtA[i] = 0x1a + } + if m.Counter != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Counter)) + i-- + dAtA[i] = 0x10 + } + if m.PoolId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -1067,6 +1170,25 @@ func (m *PositionRequest) Size() (n int) { return n } +func (m *ADLCounter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovTypes(uint64(m.PoolId)) + } + if m.Counter != 0 { + n += 1 + sovTypes(uint64(m.Counter)) + } + l = len(m.NextKey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2372,6 +2494,128 @@ func (m *PositionRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *ADLCounter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ADLCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADLCounter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) + } + m.Counter = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Counter |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextKey = append(m.NextKey[:0], dAtA[iNdEx:postIndex]...) + if m.NextKey == nil { + m.NextKey = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/stablestake/types/query.pb.go b/x/stablestake/types/query.pb.go index ce12ebbfc..9a70730ab 100644 --- a/x/stablestake/types/query.pb.go +++ b/x/stablestake/types/query.pb.go @@ -1333,7 +1333,6 @@ func _Query_MaxBondableAmount_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.stablestake.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/stablestake/types/tx.pb.go b/x/stablestake/types/tx.pb.go index eee3a3e85..1fd3331c9 100644 --- a/x/stablestake/types/tx.pb.go +++ b/x/stablestake/types/tx.pb.go @@ -768,7 +768,6 @@ func _Msg_UpdatePool_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.stablestake.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/tier/keeper/portfolio.go b/x/tier/keeper/portfolio.go index 20680ae93..c54108b66 100644 --- a/x/tier/keeper/portfolio.go +++ b/x/tier/keeper/portfolio.go @@ -227,7 +227,7 @@ func (k Keeper) RetrievePerpetualTotal(ctx sdk.Context, user sdk.AccAddress) (os totalAssets := osmomath.ZeroBigDec() totalLiability := osmomath.ZeroBigDec() var netValue osmomath.BigDec - perpetuals, _, err := k.perpetual.GetMTPsForAddressWithPagination(ctx, user, nil) + perpetuals, err := k.perpetual.GetAllMTPForAddress(ctx, user) if err != nil { return osmomath.ZeroBigDec(), osmomath.ZeroBigDec(), osmomath.ZeroBigDec() } diff --git a/x/tier/types/expected_keepers.go b/x/tier/types/expected_keepers.go index d28ecbf13..96d473b02 100644 --- a/x/tier/types/expected_keepers.go +++ b/x/tier/types/expected_keepers.go @@ -50,8 +50,7 @@ type CommitmentKeeper interface { } type PerpetualKeeper interface { - GetAllMTPsForAddress(ctx sdk.Context, mtpAddress sdk.AccAddress) []*perpetualtypes.MTP - GetMTPsForAddressWithPagination(ctx sdk.Context, mtpAddress sdk.AccAddress, pagination *query.PageRequest) ([]*perpetualtypes.MtpAndPrice, *query.PageResponse, error) + GetAllMTPForAddress(ctx sdk.Context, mtpAddress sdk.AccAddress) ([]*perpetualtypes.MtpAndPrice, error) } // AssetProfileKeeper defines the expected interface needed to retrieve denom info diff --git a/x/tier/types/query.pb.go b/x/tier/types/query.pb.go index 306a27d5d..096051072 100644 --- a/x/tier/types/query.pb.go +++ b/x/tier/types/query.pb.go @@ -2294,7 +2294,6 @@ func _Query_GetOraclePrices_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.tier.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/tier/types/tx.pb.go b/x/tier/types/tx.pb.go index 6c711f1b5..c35d67dcf 100644 --- a/x/tier/types/tx.pb.go +++ b/x/tier/types/tx.pb.go @@ -216,7 +216,6 @@ func _Msg_SetPortfolio_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.tier.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/tokenomics/types/query.pb.go b/x/tokenomics/types/query.pb.go index bdf9dd101..271cf7c88 100644 --- a/x/tokenomics/types/query.pb.go +++ b/x/tokenomics/types/query.pb.go @@ -875,7 +875,6 @@ func _Query_TimeBasedInflationAll_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.tokenomics.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/tokenomics/types/tx.pb.go b/x/tokenomics/types/tx.pb.go index d8fa8b8cf..f132cc7f3 100644 --- a/x/tokenomics/types/tx.pb.go +++ b/x/tokenomics/types/tx.pb.go @@ -1199,7 +1199,6 @@ func _Msg_DeleteTimeBasedInflation_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.tokenomics.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/tradeshield/types/expected_keepers.go b/x/tradeshield/types/expected_keepers.go index 12cefc9ea..23f09ed7c 100644 --- a/x/tradeshield/types/expected_keepers.go +++ b/x/tradeshield/types/expected_keepers.go @@ -4,7 +4,6 @@ import ( "context" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" ammtypes "github.com/elys-network/elys/v6/x/amm/types" perpetualtypes "github.com/elys-network/elys/v6/x/perpetual/types" "github.com/osmosis-labs/osmosis/osmomath" @@ -48,7 +47,7 @@ type PerpetualKeeper interface { HandleOpenEstimation(ctx sdk.Context, req *perpetualtypes.QueryOpenEstimationRequest) (*perpetualtypes.QueryOpenEstimationResponse, error) HandleCloseEstimation(ctx sdk.Context, req *perpetualtypes.QueryCloseEstimationRequest) (res *perpetualtypes.QueryCloseEstimationResponse, err error) GetAssetPriceAndAssetUsdcDenomRatio(ctx sdk.Context, asset string) (sdkmath.LegacyDec, osmomath.BigDec, error) - GetMTPsForAddressWithPagination(ctx sdk.Context, mtpAddress sdk.AccAddress, pagination *query.PageRequest) ([]*perpetualtypes.MtpAndPrice, *query.PageResponse, error) + GetAllMTPForAddress(ctx sdk.Context, mtpAddress sdk.AccAddress) ([]*perpetualtypes.MtpAndPrice, error) GetTradingAsset(ctx sdk.Context, poolId uint64) (string, error) IsWhitelistingEnabled(ctx sdk.Context) bool CheckIfWhitelisted(ctx sdk.Context, address sdk.AccAddress) bool diff --git a/x/tradeshield/types/mocks/perpetual_keeper.go b/x/tradeshield/types/mocks/perpetual_keeper.go index 30486b52f..d37fa8bf3 100644 --- a/x/tradeshield/types/mocks/perpetual_keeper.go +++ b/x/tradeshield/types/mocks/perpetual_keeper.go @@ -9,8 +9,6 @@ import ( perpetualtypes "github.com/elys-network/elys/v6/x/perpetual/types" - query "github.com/cosmos/cosmos-sdk/types/query" - types "github.com/cosmos/cosmos-sdk/types" ) @@ -133,6 +131,65 @@ func (_c *PerpetualKeeper_Close_Call) RunAndReturn(run func(types.Context, *perp return _c } +// GetAllMTPForAddress provides a mock function with given fields: ctx, mtpAddress +func (_m *PerpetualKeeper) GetAllMTPForAddress(ctx types.Context, mtpAddress types.AccAddress) ([]*perpetualtypes.MtpAndPrice, error) { + ret := _m.Called(ctx, mtpAddress) + + if len(ret) == 0 { + panic("no return value specified for GetAllMTPForAddress") + } + + var r0 []*perpetualtypes.MtpAndPrice + var r1 error + if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress) ([]*perpetualtypes.MtpAndPrice, error)); ok { + return rf(ctx, mtpAddress) + } + if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress) []*perpetualtypes.MtpAndPrice); ok { + r0 = rf(ctx, mtpAddress) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*perpetualtypes.MtpAndPrice) + } + } + + if rf, ok := ret.Get(1).(func(types.Context, types.AccAddress) error); ok { + r1 = rf(ctx, mtpAddress) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PerpetualKeeper_GetAllMTPForAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllMTPForAddress' +type PerpetualKeeper_GetAllMTPForAddress_Call struct { + *mock.Call +} + +// GetAllMTPForAddress is a helper method to define mock.On call +// - ctx types.Context +// - mtpAddress types.AccAddress +func (_e *PerpetualKeeper_Expecter) GetAllMTPForAddress(ctx interface{}, mtpAddress interface{}) *PerpetualKeeper_GetAllMTPForAddress_Call { + return &PerpetualKeeper_GetAllMTPForAddress_Call{Call: _e.mock.On("GetAllMTPForAddress", ctx, mtpAddress)} +} + +func (_c *PerpetualKeeper_GetAllMTPForAddress_Call) Run(run func(ctx types.Context, mtpAddress types.AccAddress)) *PerpetualKeeper_GetAllMTPForAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Context), args[1].(types.AccAddress)) + }) + return _c +} + +func (_c *PerpetualKeeper_GetAllMTPForAddress_Call) Return(_a0 []*perpetualtypes.MtpAndPrice, _a1 error) *PerpetualKeeper_GetAllMTPForAddress_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PerpetualKeeper_GetAllMTPForAddress_Call) RunAndReturn(run func(types.Context, types.AccAddress) ([]*perpetualtypes.MtpAndPrice, error)) *PerpetualKeeper_GetAllMTPForAddress_Call { + _c.Call.Return(run) + return _c +} + // GetAssetPriceAndAssetUsdcDenomRatio provides a mock function with given fields: ctx, asset func (_m *PerpetualKeeper) GetAssetPriceAndAssetUsdcDenomRatio(ctx types.Context, asset string) (math.LegacyDec, osmomath.BigDec, error) { ret := _m.Called(ctx, asset) @@ -256,75 +313,6 @@ func (_c *PerpetualKeeper_GetMTP_Call) RunAndReturn(run func(types.Context, uint return _c } -// GetMTPsForAddressWithPagination provides a mock function with given fields: ctx, mtpAddress, pagination -func (_m *PerpetualKeeper) GetMTPsForAddressWithPagination(ctx types.Context, mtpAddress types.AccAddress, pagination *query.PageRequest) ([]*perpetualtypes.MtpAndPrice, *query.PageResponse, error) { - ret := _m.Called(ctx, mtpAddress, pagination) - - if len(ret) == 0 { - panic("no return value specified for GetMTPsForAddressWithPagination") - } - - var r0 []*perpetualtypes.MtpAndPrice - var r1 *query.PageResponse - var r2 error - if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress, *query.PageRequest) ([]*perpetualtypes.MtpAndPrice, *query.PageResponse, error)); ok { - return rf(ctx, mtpAddress, pagination) - } - if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress, *query.PageRequest) []*perpetualtypes.MtpAndPrice); ok { - r0 = rf(ctx, mtpAddress, pagination) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*perpetualtypes.MtpAndPrice) - } - } - - if rf, ok := ret.Get(1).(func(types.Context, types.AccAddress, *query.PageRequest) *query.PageResponse); ok { - r1 = rf(ctx, mtpAddress, pagination) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(*query.PageResponse) - } - } - - if rf, ok := ret.Get(2).(func(types.Context, types.AccAddress, *query.PageRequest) error); ok { - r2 = rf(ctx, mtpAddress, pagination) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// PerpetualKeeper_GetMTPsForAddressWithPagination_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMTPsForAddressWithPagination' -type PerpetualKeeper_GetMTPsForAddressWithPagination_Call struct { - *mock.Call -} - -// GetMTPsForAddressWithPagination is a helper method to define mock.On call -// - ctx types.Context -// - mtpAddress types.AccAddress -// - pagination *query.PageRequest -func (_e *PerpetualKeeper_Expecter) GetMTPsForAddressWithPagination(ctx interface{}, mtpAddress interface{}, pagination interface{}) *PerpetualKeeper_GetMTPsForAddressWithPagination_Call { - return &PerpetualKeeper_GetMTPsForAddressWithPagination_Call{Call: _e.mock.On("GetMTPsForAddressWithPagination", ctx, mtpAddress, pagination)} -} - -func (_c *PerpetualKeeper_GetMTPsForAddressWithPagination_Call) Run(run func(ctx types.Context, mtpAddress types.AccAddress, pagination *query.PageRequest)) *PerpetualKeeper_GetMTPsForAddressWithPagination_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(types.Context), args[1].(types.AccAddress), args[2].(*query.PageRequest)) - }) - return _c -} - -func (_c *PerpetualKeeper_GetMTPsForAddressWithPagination_Call) Return(_a0 []*perpetualtypes.MtpAndPrice, _a1 *query.PageResponse, _a2 error) *PerpetualKeeper_GetMTPsForAddressWithPagination_Call { - _c.Call.Return(_a0, _a1, _a2) - return _c -} - -func (_c *PerpetualKeeper_GetMTPsForAddressWithPagination_Call) RunAndReturn(run func(types.Context, types.AccAddress, *query.PageRequest) ([]*perpetualtypes.MtpAndPrice, *query.PageResponse, error)) *PerpetualKeeper_GetMTPsForAddressWithPagination_Call { - _c.Call.Return(run) - return _c -} - // GetParams provides a mock function with given fields: ctx func (_m *PerpetualKeeper) GetParams(ctx types.Context) perpetualtypes.Params { ret := _m.Called(ctx) diff --git a/x/tradeshield/types/query.pb.go b/x/tradeshield/types/query.pb.go index 6c84a06a7..2f535cfd5 100644 --- a/x/tradeshield/types/query.pb.go +++ b/x/tradeshield/types/query.pb.go @@ -1052,7 +1052,6 @@ func _Query_PendingSpotOrderForAddress_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } -var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.tradeshield.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/tradeshield/types/tx.pb.go b/x/tradeshield/types/tx.pb.go index 5426b9dc6..60dfc2ecf 100644 --- a/x/tradeshield/types/tx.pb.go +++ b/x/tradeshield/types/tx.pb.go @@ -2036,7 +2036,6 @@ func _Msg_ExecuteOrders_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "elys.tradeshield.Msg", HandlerType: (*MsgServer)(nil), From 9240144d05bfbba9d213985a19c790b9e4581d2b Mon Sep 17 00:00:00 2001 From: avkr003 Date: Tue, 22 Jul 2025 03:47:01 +0530 Subject: [PATCH 2/4] adding closing ratio in close tx --- api/elys/masterchef/tx.pulsar.go | 323 +-- api/elys/perpetual/params.pulsar.go | 2543 ++-------------------- proto/elys/masterchef/tx.proto | 4 +- x/masterchef/types/tx.pb.go | 190 +- x/perpetual/client/cli/tx_close.go | 13 +- x/perpetual/genesis.go | 6 + x/perpetual/keeper/adl.go | 11 +- x/perpetual/keeper/close_position.go | 16 +- x/perpetual/keeper/estimate_and_repay.go | 6 +- x/perpetual/keeper/events.go | 34 +- x/perpetual/migrations/v22_migration.go | 15 + x/perpetual/module.go | 4 +- x/perpetual/types/events.go | 2 +- x/perpetual/types/params.pb.go | 1914 ++++------------ 14 files changed, 779 insertions(+), 4302 deletions(-) create mode 100644 x/perpetual/migrations/v22_migration.go diff --git a/api/elys/masterchef/tx.pulsar.go b/api/elys/masterchef/tx.pulsar.go index efae806b9..6a675d6b4 100644 --- a/api/elys/masterchef/tx.pulsar.go +++ b/api/elys/masterchef/tx.pulsar.go @@ -3,7 +3,6 @@ package masterchef import ( _ "cosmossdk.io/api/amino" - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" @@ -6514,66 +6513,13 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurn) ProtoMethods() *protoiface } } -var _ protoreflect.List = (*_MsgToggleTakerFeeSwapAndBurnResponse_1_list)(nil) - -type _MsgToggleTakerFeeSwapAndBurnResponse_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgToggleTakerFeeSwapAndBurnResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgToggleTakerFeeSwapAndBurnResponse protoreflect.MessageDescriptor - fd_MsgToggleTakerFeeSwapAndBurnResponse_burnt_coins protoreflect.FieldDescriptor + md_MsgToggleTakerFeeSwapAndBurnResponse protoreflect.MessageDescriptor ) func init() { file_elys_masterchef_tx_proto_init() md_MsgToggleTakerFeeSwapAndBurnResponse = File_elys_masterchef_tx_proto.Messages().ByName("MsgToggleTakerFeeSwapAndBurnResponse") - fd_MsgToggleTakerFeeSwapAndBurnResponse_burnt_coins = md_MsgToggleTakerFeeSwapAndBurnResponse.Fields().ByName("burnt_coins") } var _ protoreflect.Message = (*fastReflection_MsgToggleTakerFeeSwapAndBurnResponse)(nil) @@ -6641,12 +6587,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Interface() protor // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.BurntCoins) != 0 { - value := protoreflect.ValueOfList(&_MsgToggleTakerFeeSwapAndBurnResponse_1_list{list: &x.BurntCoins}) - if !f(fd_MsgToggleTakerFeeSwapAndBurnResponse_burnt_coins, value) { - return - } - } } // Has reports whether a field is populated. @@ -6662,8 +6602,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Range(f func(proto // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse.burnt_coins": - return len(x.BurntCoins) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse")) @@ -6680,8 +6618,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Has(fd protoreflec // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse.burnt_coins": - x.BurntCoins = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse")) @@ -6698,12 +6634,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Clear(fd protorefl // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse.burnt_coins": - if len(x.BurntCoins) == 0 { - return protoreflect.ValueOfList(&_MsgToggleTakerFeeSwapAndBurnResponse_1_list{}) - } - listValue := &_MsgToggleTakerFeeSwapAndBurnResponse_1_list{list: &x.BurntCoins} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse")) @@ -6724,10 +6654,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Get(descriptor pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse.burnt_coins": - lv := value.List() - clv := lv.(*_MsgToggleTakerFeeSwapAndBurnResponse_1_list) - x.BurntCoins = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse")) @@ -6748,12 +6674,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Set(fd protoreflec // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse.burnt_coins": - if x.BurntCoins == nil { - x.BurntCoins = []*v1beta1.Coin{} - } - value := &_MsgToggleTakerFeeSwapAndBurnResponse_1_list{list: &x.BurntCoins} - return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse")) @@ -6767,9 +6687,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) Mutable(fd protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse.burnt_coins": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgToggleTakerFeeSwapAndBurnResponse_1_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse")) @@ -6839,12 +6756,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) ProtoMethods() *pr var n int var l int _ = l - if len(x.BurntCoins) > 0 { - for _, e := range x.BurntCoins { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6874,22 +6785,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) ProtoMethods() *pr i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.BurntCoins) > 0 { - for iNdEx := len(x.BurntCoins) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BurntCoins[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] = 0xa - } - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -6939,40 +6834,6 @@ func (x *fastReflection_MsgToggleTakerFeeSwapAndBurnResponse) ProtoMethods() *pr return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgToggleTakerFeeSwapAndBurnResponse: 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 BurntCoins", 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 - } - x.BurntCoins = append(x.BurntCoins, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BurntCoins[len(x.BurntCoins)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7573,8 +7434,6 @@ type MsgToggleTakerFeeSwapAndBurnResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - BurntCoins []*v1beta1.Coin `protobuf:"bytes,1,rep,name=burnt_coins,json=burntCoins,proto3" json:"burnt_coins,omitempty"` } func (x *MsgToggleTakerFeeSwapAndBurnResponse) Reset() { @@ -7597,13 +7456,6 @@ func (*MsgToggleTakerFeeSwapAndBurnResponse) Descriptor() ([]byte, []int) { return file_elys_masterchef_tx_proto_rawDescGZIP(), []int{14} } -func (x *MsgToggleTakerFeeSwapAndBurnResponse) GetBurntCoins() []*v1beta1.Coin { - if x != nil { - return x.BurntCoins - } - return nil -} - var File_elys_masterchef_tx_proto protoreflect.FileDescriptor var file_elys_masterchef_tx_proto_rawDesc = []byte{ @@ -7617,8 +7469,6 @@ var file_elys_masterchef_tx_proto_rawDesc = []byte{ 0x73, 0x67, 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, 0x99, 0x02, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, @@ -7732,79 +7582,72 @@ var file_elys_masterchef_tx_proto_rawDesc = []byte{ 0x6e, 0x64, 0x65, 0x72, 0x3a, 0x37, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x27, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x46, - 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x22, 0x94, 0x01, - 0x0a, 0x24, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x72, - 0x46, 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x0b, 0x62, 0x75, 0x72, 0x6e, 0x74, 0x5f, - 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x01, 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, 0x0a, 0x62, 0x75, 0x72, 0x6e, 0x74, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x32, 0xa4, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x78, 0x0a, 0x16, - 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x2a, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, - 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x45, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x1a, 0x32, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x76, 0x65, 0x12, 0x28, - 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, - 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, - 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x76, 0x65, 0x1a, 0x30, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, - 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x69, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0c, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x65, 0x6c, 0x79, - 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x28, 0x2e, 0x65, - 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x73, 0x12, - 0x29, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, - 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, - 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x73, 0x1a, 0x31, 0x2e, 0x65, 0x6c, 0x79, - 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, - 0x6c, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, - 0x0c, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x20, 0x2e, - 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x1a, + 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x22, 0x26, 0x0a, + 0x24, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x46, + 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa4, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x78, 0x0a, + 0x16, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x2a, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, + 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, + 0x6e, 0x6f, 0x6d, 0x1a, 0x32, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x76, 0x65, 0x12, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, - 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x54, 0x6f, 0x67, - 0x67, 0x6c, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x45, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x73, 0x12, 0x29, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x50, 0x6f, - 0x6f, 0x6c, 0x45, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x1a, 0x31, 0x2e, + 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x49, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x76, 0x65, 0x1a, 0x30, 0x2e, 0x65, 0x6c, 0x79, 0x73, + 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x41, + 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x63, 0x65, 0x6e, 0x74, + 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x65, 0x6c, + 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, - 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x45, 0x64, 0x65, - 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x81, 0x01, 0x0a, 0x19, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x72, - 0x46, 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x12, 0x2d, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x73, + 0x12, 0x29, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, + 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x73, 0x1a, 0x31, 0x2e, 0x65, 0x6c, + 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, + 0x0a, 0x0c, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x20, + 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x1a, 0x28, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, + 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x54, 0x6f, + 0x67, 0x67, 0x6c, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x45, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x12, 0x29, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x50, + 0x6f, 0x6f, 0x6c, 0x45, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x1a, 0x31, + 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, + 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x45, 0x64, + 0x65, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x81, 0x01, 0x0a, 0x19, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, + 0x72, 0x46, 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x12, + 0x2d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, + 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x72, + 0x46, 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x1a, 0x35, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x46, - 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x1a, 0x35, 0x2e, - 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x2e, - 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, - 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb0, 0x01, 0x0a, 0x13, - 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, - 0x68, 0x65, 0x66, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, - 0x68, 0x65, 0x66, 0xa2, 0x02, 0x03, 0x45, 0x4d, 0x58, 0xaa, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, - 0x2e, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0xca, 0x02, 0x0f, 0x45, 0x6c, - 0x79, 0x73, 0x5c, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0xe2, 0x02, 0x1b, - 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x45, 0x6c, - 0x79, 0x73, 0x3a, 0x3a, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x65, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6e, 0x64, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb0, 0x01, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, + 0x63, 0x68, 0x65, 0x66, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, + 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, + 0x63, 0x68, 0x65, 0x66, 0xa2, 0x02, 0x03, 0x45, 0x4d, 0x58, 0xaa, 0x02, 0x0f, 0x45, 0x6c, 0x79, + 0x73, 0x2e, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0xca, 0x02, 0x0f, 0x45, + 0x6c, 0x79, 0x73, 0x5c, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0xe2, 0x02, + 0x1b, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x45, + 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x63, 0x68, 0x65, 0x66, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7837,31 +7680,29 @@ var file_elys_masterchef_tx_proto_goTypes = []interface{}{ (*MsgToggleTakerFeeSwapAndBurn)(nil), // 13: elys.masterchef.MsgToggleTakerFeeSwapAndBurn (*MsgToggleTakerFeeSwapAndBurnResponse)(nil), // 14: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse (*Params)(nil), // 15: elys.masterchef.Params - (*v1beta1.Coin)(nil), // 16: cosmos.base.v1beta1.Coin } var file_elys_masterchef_tx_proto_depIdxs = []int32{ 15, // 0: elys.masterchef.MsgUpdateParams.params:type_name -> elys.masterchef.Params 6, // 1: elys.masterchef.MsgUpdatePoolMultipliers.pool_multipliers:type_name -> elys.masterchef.PoolMultiplier - 16, // 2: elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse.burnt_coins:type_name -> cosmos.base.v1beta1.Coin - 0, // 3: elys.masterchef.Msg.AddExternalRewardDenom:input_type -> elys.masterchef.MsgAddExternalRewardDenom - 2, // 4: elys.masterchef.Msg.AddExternalIncentive:input_type -> elys.masterchef.MsgAddExternalIncentive - 4, // 5: elys.masterchef.Msg.UpdateParams:input_type -> elys.masterchef.MsgUpdateParams - 7, // 6: elys.masterchef.Msg.UpdatePoolMultipliers:input_type -> elys.masterchef.MsgUpdatePoolMultipliers - 9, // 7: elys.masterchef.Msg.ClaimRewards:input_type -> elys.masterchef.MsgClaimRewards - 11, // 8: elys.masterchef.Msg.TogglePoolEdenRewards:input_type -> elys.masterchef.MsgTogglePoolEdenRewards - 13, // 9: elys.masterchef.Msg.ToggleTakerFeeSwapAndBurn:input_type -> elys.masterchef.MsgToggleTakerFeeSwapAndBurn - 1, // 10: elys.masterchef.Msg.AddExternalRewardDenom:output_type -> elys.masterchef.MsgAddExternalRewardDenomResponse - 3, // 11: elys.masterchef.Msg.AddExternalIncentive:output_type -> elys.masterchef.MsgAddExternalIncentiveResponse - 5, // 12: elys.masterchef.Msg.UpdateParams:output_type -> elys.masterchef.MsgUpdateParamsResponse - 8, // 13: elys.masterchef.Msg.UpdatePoolMultipliers:output_type -> elys.masterchef.MsgUpdatePoolMultipliersResponse - 10, // 14: elys.masterchef.Msg.ClaimRewards:output_type -> elys.masterchef.MsgClaimRewardsResponse - 12, // 15: elys.masterchef.Msg.TogglePoolEdenRewards:output_type -> elys.masterchef.MsgTogglePoolEdenRewardsResponse - 14, // 16: elys.masterchef.Msg.ToggleTakerFeeSwapAndBurn:output_type -> elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse - 10, // [10:17] is the sub-list for method output_type - 3, // [3:10] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 2: elys.masterchef.Msg.AddExternalRewardDenom:input_type -> elys.masterchef.MsgAddExternalRewardDenom + 2, // 3: elys.masterchef.Msg.AddExternalIncentive:input_type -> elys.masterchef.MsgAddExternalIncentive + 4, // 4: elys.masterchef.Msg.UpdateParams:input_type -> elys.masterchef.MsgUpdateParams + 7, // 5: elys.masterchef.Msg.UpdatePoolMultipliers:input_type -> elys.masterchef.MsgUpdatePoolMultipliers + 9, // 6: elys.masterchef.Msg.ClaimRewards:input_type -> elys.masterchef.MsgClaimRewards + 11, // 7: elys.masterchef.Msg.TogglePoolEdenRewards:input_type -> elys.masterchef.MsgTogglePoolEdenRewards + 13, // 8: elys.masterchef.Msg.ToggleTakerFeeSwapAndBurn:input_type -> elys.masterchef.MsgToggleTakerFeeSwapAndBurn + 1, // 9: elys.masterchef.Msg.AddExternalRewardDenom:output_type -> elys.masterchef.MsgAddExternalRewardDenomResponse + 3, // 10: elys.masterchef.Msg.AddExternalIncentive:output_type -> elys.masterchef.MsgAddExternalIncentiveResponse + 5, // 11: elys.masterchef.Msg.UpdateParams:output_type -> elys.masterchef.MsgUpdateParamsResponse + 8, // 12: elys.masterchef.Msg.UpdatePoolMultipliers:output_type -> elys.masterchef.MsgUpdatePoolMultipliersResponse + 10, // 13: elys.masterchef.Msg.ClaimRewards:output_type -> elys.masterchef.MsgClaimRewardsResponse + 12, // 14: elys.masterchef.Msg.TogglePoolEdenRewards:output_type -> elys.masterchef.MsgTogglePoolEdenRewardsResponse + 14, // 15: elys.masterchef.Msg.ToggleTakerFeeSwapAndBurn:output_type -> elys.masterchef.MsgToggleTakerFeeSwapAndBurnResponse + 9, // [9:16] is the sub-list for method output_type + 2, // [2:9] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_elys_masterchef_tx_proto_init() } diff --git a/api/elys/perpetual/params.pulsar.go b/api/elys/perpetual/params.pulsar.go index c75e594c3..f23358e11 100644 --- a/api/elys/perpetual/params.pulsar.go +++ b/api/elys/perpetual/params.pulsar.go @@ -14,1838 +14,6 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_LegacyParams_22_list)(nil) - -type _LegacyParams_22_list struct { - list *[]uint64 -} - -func (x *_LegacyParams_22_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LegacyParams_22_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_LegacyParams_22_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_LegacyParams_22_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_LegacyParams_22_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message LegacyParams at list field EnabledPools as it is not of Message kind")) -} - -func (x *_LegacyParams_22_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_LegacyParams_22_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_LegacyParams_22_list) IsValid() bool { - return x.list != nil -} - -var ( - md_LegacyParams protoreflect.MessageDescriptor - fd_LegacyParams_leverage_max protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_max protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_min protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_increase protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_rate_decrease protoreflect.FieldDescriptor - fd_LegacyParams_health_gain_factor protoreflect.FieldDescriptor - fd_LegacyParams_max_open_positions protoreflect.FieldDescriptor - fd_LegacyParams_pool_max_liabilities_threshold protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_payment_fund_percentage protoreflect.FieldDescriptor - fd_LegacyParams_legacy_borrow_interest_payment_fund_address protoreflect.FieldDescriptor - fd_LegacyParams_safety_factor protoreflect.FieldDescriptor - fd_LegacyParams_borrow_interest_payment_enabled protoreflect.FieldDescriptor - fd_LegacyParams_whitelisting_enabled protoreflect.FieldDescriptor - fd_LegacyParams_perpetual_swap_fee protoreflect.FieldDescriptor - fd_LegacyParams_max_limit_order protoreflect.FieldDescriptor - fd_LegacyParams_fixed_funding_rate protoreflect.FieldDescriptor - fd_LegacyParams_minimum_long_take_profit_price_ratio protoreflect.FieldDescriptor - fd_LegacyParams_maximum_long_take_profit_price_ratio protoreflect.FieldDescriptor - fd_LegacyParams_maximum_short_take_profit_price_ratio protoreflect.FieldDescriptor - fd_LegacyParams_enable_take_profit_custody_liabilities protoreflect.FieldDescriptor - fd_LegacyParams_weight_breaking_fee_factor protoreflect.FieldDescriptor - fd_LegacyParams_enabled_pools protoreflect.FieldDescriptor -) - -func init() { - file_elys_perpetual_params_proto_init() - md_LegacyParams = File_elys_perpetual_params_proto.Messages().ByName("LegacyParams") - fd_LegacyParams_leverage_max = md_LegacyParams.Fields().ByName("leverage_max") - fd_LegacyParams_borrow_interest_rate_max = md_LegacyParams.Fields().ByName("borrow_interest_rate_max") - fd_LegacyParams_borrow_interest_rate_min = md_LegacyParams.Fields().ByName("borrow_interest_rate_min") - fd_LegacyParams_borrow_interest_rate_increase = md_LegacyParams.Fields().ByName("borrow_interest_rate_increase") - fd_LegacyParams_borrow_interest_rate_decrease = md_LegacyParams.Fields().ByName("borrow_interest_rate_decrease") - fd_LegacyParams_health_gain_factor = md_LegacyParams.Fields().ByName("health_gain_factor") - fd_LegacyParams_max_open_positions = md_LegacyParams.Fields().ByName("max_open_positions") - fd_LegacyParams_pool_max_liabilities_threshold = md_LegacyParams.Fields().ByName("pool_max_liabilities_threshold") - fd_LegacyParams_borrow_interest_payment_fund_percentage = md_LegacyParams.Fields().ByName("borrow_interest_payment_fund_percentage") - fd_LegacyParams_legacy_borrow_interest_payment_fund_address = md_LegacyParams.Fields().ByName("legacy_borrow_interest_payment_fund_address") - fd_LegacyParams_safety_factor = md_LegacyParams.Fields().ByName("safety_factor") - fd_LegacyParams_borrow_interest_payment_enabled = md_LegacyParams.Fields().ByName("borrow_interest_payment_enabled") - fd_LegacyParams_whitelisting_enabled = md_LegacyParams.Fields().ByName("whitelisting_enabled") - fd_LegacyParams_perpetual_swap_fee = md_LegacyParams.Fields().ByName("perpetual_swap_fee") - fd_LegacyParams_max_limit_order = md_LegacyParams.Fields().ByName("max_limit_order") - fd_LegacyParams_fixed_funding_rate = md_LegacyParams.Fields().ByName("fixed_funding_rate") - fd_LegacyParams_minimum_long_take_profit_price_ratio = md_LegacyParams.Fields().ByName("minimum_long_take_profit_price_ratio") - fd_LegacyParams_maximum_long_take_profit_price_ratio = md_LegacyParams.Fields().ByName("maximum_long_take_profit_price_ratio") - fd_LegacyParams_maximum_short_take_profit_price_ratio = md_LegacyParams.Fields().ByName("maximum_short_take_profit_price_ratio") - fd_LegacyParams_enable_take_profit_custody_liabilities = md_LegacyParams.Fields().ByName("enable_take_profit_custody_liabilities") - fd_LegacyParams_weight_breaking_fee_factor = md_LegacyParams.Fields().ByName("weight_breaking_fee_factor") - fd_LegacyParams_enabled_pools = md_LegacyParams.Fields().ByName("enabled_pools") -} - -var _ protoreflect.Message = (*fastReflection_LegacyParams)(nil) - -type fastReflection_LegacyParams LegacyParams - -func (x *LegacyParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_LegacyParams)(x) -} - -func (x *LegacyParams) slowProtoReflect() protoreflect.Message { - mi := &file_elys_perpetual_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_LegacyParams_messageType fastReflection_LegacyParams_messageType -var _ protoreflect.MessageType = fastReflection_LegacyParams_messageType{} - -type fastReflection_LegacyParams_messageType struct{} - -func (x fastReflection_LegacyParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_LegacyParams)(nil) -} -func (x fastReflection_LegacyParams_messageType) New() protoreflect.Message { - return new(fastReflection_LegacyParams) -} -func (x fastReflection_LegacyParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LegacyParams) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyParams -} - -// 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_LegacyParams) Type() protoreflect.MessageType { - return _fastReflection_LegacyParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LegacyParams) New() protoreflect.Message { - return new(fastReflection_LegacyParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LegacyParams) Interface() protoreflect.ProtoMessage { - return (*LegacyParams)(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_LegacyParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.LeverageMax != "" { - value := protoreflect.ValueOfString(x.LeverageMax) - if !f(fd_LegacyParams_leverage_max, value) { - return - } - } - if x.BorrowInterestRateMax != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateMax) - if !f(fd_LegacyParams_borrow_interest_rate_max, value) { - return - } - } - if x.BorrowInterestRateMin != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateMin) - if !f(fd_LegacyParams_borrow_interest_rate_min, value) { - return - } - } - if x.BorrowInterestRateIncrease != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateIncrease) - if !f(fd_LegacyParams_borrow_interest_rate_increase, value) { - return - } - } - if x.BorrowInterestRateDecrease != "" { - value := protoreflect.ValueOfString(x.BorrowInterestRateDecrease) - if !f(fd_LegacyParams_borrow_interest_rate_decrease, value) { - return - } - } - if x.HealthGainFactor != "" { - value := protoreflect.ValueOfString(x.HealthGainFactor) - if !f(fd_LegacyParams_health_gain_factor, value) { - return - } - } - if x.MaxOpenPositions != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxOpenPositions) - if !f(fd_LegacyParams_max_open_positions, value) { - return - } - } - if x.PoolMaxLiabilitiesThreshold != "" { - value := protoreflect.ValueOfString(x.PoolMaxLiabilitiesThreshold) - if !f(fd_LegacyParams_pool_max_liabilities_threshold, value) { - return - } - } - if x.BorrowInterestPaymentFundPercentage != "" { - value := protoreflect.ValueOfString(x.BorrowInterestPaymentFundPercentage) - if !f(fd_LegacyParams_borrow_interest_payment_fund_percentage, value) { - return - } - } - if x.LegacyBorrowInterestPaymentFundAddress != "" { - value := protoreflect.ValueOfString(x.LegacyBorrowInterestPaymentFundAddress) - if !f(fd_LegacyParams_legacy_borrow_interest_payment_fund_address, value) { - return - } - } - if x.SafetyFactor != "" { - value := protoreflect.ValueOfString(x.SafetyFactor) - if !f(fd_LegacyParams_safety_factor, value) { - return - } - } - if x.BorrowInterestPaymentEnabled != false { - value := protoreflect.ValueOfBool(x.BorrowInterestPaymentEnabled) - if !f(fd_LegacyParams_borrow_interest_payment_enabled, value) { - return - } - } - if x.WhitelistingEnabled != false { - value := protoreflect.ValueOfBool(x.WhitelistingEnabled) - if !f(fd_LegacyParams_whitelisting_enabled, value) { - return - } - } - if x.PerpetualSwapFee != "" { - value := protoreflect.ValueOfString(x.PerpetualSwapFee) - if !f(fd_LegacyParams_perpetual_swap_fee, value) { - return - } - } - if x.MaxLimitOrder != int64(0) { - value := protoreflect.ValueOfInt64(x.MaxLimitOrder) - if !f(fd_LegacyParams_max_limit_order, value) { - return - } - } - if x.FixedFundingRate != "" { - value := protoreflect.ValueOfString(x.FixedFundingRate) - if !f(fd_LegacyParams_fixed_funding_rate, value) { - return - } - } - if x.MinimumLongTakeProfitPriceRatio != "" { - value := protoreflect.ValueOfString(x.MinimumLongTakeProfitPriceRatio) - if !f(fd_LegacyParams_minimum_long_take_profit_price_ratio, value) { - return - } - } - if x.MaximumLongTakeProfitPriceRatio != "" { - value := protoreflect.ValueOfString(x.MaximumLongTakeProfitPriceRatio) - if !f(fd_LegacyParams_maximum_long_take_profit_price_ratio, value) { - return - } - } - if x.MaximumShortTakeProfitPriceRatio != "" { - value := protoreflect.ValueOfString(x.MaximumShortTakeProfitPriceRatio) - if !f(fd_LegacyParams_maximum_short_take_profit_price_ratio, value) { - return - } - } - if x.EnableTakeProfitCustodyLiabilities != false { - value := protoreflect.ValueOfBool(x.EnableTakeProfitCustodyLiabilities) - if !f(fd_LegacyParams_enable_take_profit_custody_liabilities, value) { - return - } - } - if x.WeightBreakingFeeFactor != "" { - value := protoreflect.ValueOfString(x.WeightBreakingFeeFactor) - if !f(fd_LegacyParams_weight_breaking_fee_factor, value) { - return - } - } - if len(x.EnabledPools) != 0 { - value := protoreflect.ValueOfList(&_LegacyParams_22_list{list: &x.EnabledPools}) - if !f(fd_LegacyParams_enabled_pools, 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_LegacyParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - return x.LeverageMax != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - return x.BorrowInterestRateMax != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - return x.BorrowInterestRateMin != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - return x.BorrowInterestRateIncrease != "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - return x.BorrowInterestRateDecrease != "" - case "elys.perpetual.LegacyParams.health_gain_factor": - return x.HealthGainFactor != "" - case "elys.perpetual.LegacyParams.max_open_positions": - return x.MaxOpenPositions != int64(0) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - return x.PoolMaxLiabilitiesThreshold != "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - return x.BorrowInterestPaymentFundPercentage != "" - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - return x.LegacyBorrowInterestPaymentFundAddress != "" - case "elys.perpetual.LegacyParams.safety_factor": - return x.SafetyFactor != "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - return x.BorrowInterestPaymentEnabled != false - case "elys.perpetual.LegacyParams.whitelisting_enabled": - return x.WhitelistingEnabled != false - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - return x.PerpetualSwapFee != "" - case "elys.perpetual.LegacyParams.max_limit_order": - return x.MaxLimitOrder != int64(0) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - return x.FixedFundingRate != "" - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - return x.MinimumLongTakeProfitPriceRatio != "" - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - return x.MaximumLongTakeProfitPriceRatio != "" - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - return x.MaximumShortTakeProfitPriceRatio != "" - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - return x.EnableTakeProfitCustodyLiabilities != false - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - return x.WeightBreakingFeeFactor != "" - case "elys.perpetual.LegacyParams.enabled_pools": - return len(x.EnabledPools) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - x.LeverageMax = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - x.BorrowInterestRateMax = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - x.BorrowInterestRateMin = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - x.BorrowInterestRateIncrease = "" - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - x.BorrowInterestRateDecrease = "" - case "elys.perpetual.LegacyParams.health_gain_factor": - x.HealthGainFactor = "" - case "elys.perpetual.LegacyParams.max_open_positions": - x.MaxOpenPositions = int64(0) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - x.PoolMaxLiabilitiesThreshold = "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - x.BorrowInterestPaymentFundPercentage = "" - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - x.LegacyBorrowInterestPaymentFundAddress = "" - case "elys.perpetual.LegacyParams.safety_factor": - x.SafetyFactor = "" - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - x.BorrowInterestPaymentEnabled = false - case "elys.perpetual.LegacyParams.whitelisting_enabled": - x.WhitelistingEnabled = false - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - x.PerpetualSwapFee = "" - case "elys.perpetual.LegacyParams.max_limit_order": - x.MaxLimitOrder = int64(0) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - x.FixedFundingRate = "" - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - x.MinimumLongTakeProfitPriceRatio = "" - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - x.MaximumLongTakeProfitPriceRatio = "" - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - x.MaximumShortTakeProfitPriceRatio = "" - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - x.EnableTakeProfitCustodyLiabilities = false - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - x.WeightBreakingFeeFactor = "" - case "elys.perpetual.LegacyParams.enabled_pools": - x.EnabledPools = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - value := x.LeverageMax - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - value := x.BorrowInterestRateMax - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - value := x.BorrowInterestRateMin - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - value := x.BorrowInterestRateIncrease - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - value := x.BorrowInterestRateDecrease - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.health_gain_factor": - value := x.HealthGainFactor - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.max_open_positions": - value := x.MaxOpenPositions - return protoreflect.ValueOfInt64(value) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - value := x.PoolMaxLiabilitiesThreshold - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - value := x.BorrowInterestPaymentFundPercentage - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - value := x.LegacyBorrowInterestPaymentFundAddress - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.safety_factor": - value := x.SafetyFactor - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - value := x.BorrowInterestPaymentEnabled - return protoreflect.ValueOfBool(value) - case "elys.perpetual.LegacyParams.whitelisting_enabled": - value := x.WhitelistingEnabled - return protoreflect.ValueOfBool(value) - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - value := x.PerpetualSwapFee - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.max_limit_order": - value := x.MaxLimitOrder - return protoreflect.ValueOfInt64(value) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - value := x.FixedFundingRate - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - value := x.MinimumLongTakeProfitPriceRatio - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - value := x.MaximumLongTakeProfitPriceRatio - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - value := x.MaximumShortTakeProfitPriceRatio - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - value := x.EnableTakeProfitCustodyLiabilities - return protoreflect.ValueOfBool(value) - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - value := x.WeightBreakingFeeFactor - return protoreflect.ValueOfString(value) - case "elys.perpetual.LegacyParams.enabled_pools": - if len(x.EnabledPools) == 0 { - return protoreflect.ValueOfList(&_LegacyParams_22_list{}) - } - listValue := &_LegacyParams_22_list{list: &x.EnabledPools} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - x.LeverageMax = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - x.BorrowInterestRateMax = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - x.BorrowInterestRateMin = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - x.BorrowInterestRateIncrease = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - x.BorrowInterestRateDecrease = value.Interface().(string) - case "elys.perpetual.LegacyParams.health_gain_factor": - x.HealthGainFactor = value.Interface().(string) - case "elys.perpetual.LegacyParams.max_open_positions": - x.MaxOpenPositions = value.Int() - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - x.PoolMaxLiabilitiesThreshold = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - x.BorrowInterestPaymentFundPercentage = value.Interface().(string) - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - x.LegacyBorrowInterestPaymentFundAddress = value.Interface().(string) - case "elys.perpetual.LegacyParams.safety_factor": - x.SafetyFactor = value.Interface().(string) - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - x.BorrowInterestPaymentEnabled = value.Bool() - case "elys.perpetual.LegacyParams.whitelisting_enabled": - x.WhitelistingEnabled = value.Bool() - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - x.PerpetualSwapFee = value.Interface().(string) - case "elys.perpetual.LegacyParams.max_limit_order": - x.MaxLimitOrder = value.Int() - case "elys.perpetual.LegacyParams.fixed_funding_rate": - x.FixedFundingRate = value.Interface().(string) - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - x.MinimumLongTakeProfitPriceRatio = value.Interface().(string) - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - x.MaximumLongTakeProfitPriceRatio = value.Interface().(string) - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - x.MaximumShortTakeProfitPriceRatio = value.Interface().(string) - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - x.EnableTakeProfitCustodyLiabilities = value.Bool() - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - x.WeightBreakingFeeFactor = value.Interface().(string) - case "elys.perpetual.LegacyParams.enabled_pools": - lv := value.List() - clv := lv.(*_LegacyParams_22_list) - x.EnabledPools = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.enabled_pools": - if x.EnabledPools == nil { - x.EnabledPools = []uint64{} - } - value := &_LegacyParams_22_list{list: &x.EnabledPools} - return protoreflect.ValueOfList(value) - case "elys.perpetual.LegacyParams.leverage_max": - panic(fmt.Errorf("field leverage_max of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - panic(fmt.Errorf("field borrow_interest_rate_max of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - panic(fmt.Errorf("field borrow_interest_rate_min of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - panic(fmt.Errorf("field borrow_interest_rate_increase of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - panic(fmt.Errorf("field borrow_interest_rate_decrease of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.health_gain_factor": - panic(fmt.Errorf("field health_gain_factor of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.max_open_positions": - panic(fmt.Errorf("field max_open_positions of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - panic(fmt.Errorf("field pool_max_liabilities_threshold of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - panic(fmt.Errorf("field borrow_interest_payment_fund_percentage of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - panic(fmt.Errorf("field legacy_borrow_interest_payment_fund_address of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.safety_factor": - panic(fmt.Errorf("field safety_factor of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - panic(fmt.Errorf("field borrow_interest_payment_enabled of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.whitelisting_enabled": - panic(fmt.Errorf("field whitelisting_enabled of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - panic(fmt.Errorf("field perpetual_swap_fee of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.max_limit_order": - panic(fmt.Errorf("field max_limit_order of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - panic(fmt.Errorf("field fixed_funding_rate of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - panic(fmt.Errorf("field minimum_long_take_profit_price_ratio of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - panic(fmt.Errorf("field maximum_long_take_profit_price_ratio of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - panic(fmt.Errorf("field maximum_short_take_profit_price_ratio of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - panic(fmt.Errorf("field enable_take_profit_custody_liabilities of message elys.perpetual.LegacyParams is not mutable")) - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - panic(fmt.Errorf("field weight_breaking_fee_factor of message elys.perpetual.LegacyParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "elys.perpetual.LegacyParams.leverage_max": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_max": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_min": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_increase": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_rate_decrease": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.health_gain_factor": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.max_open_positions": - return protoreflect.ValueOfInt64(int64(0)) - case "elys.perpetual.LegacyParams.pool_max_liabilities_threshold": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_payment_fund_percentage": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.legacy_borrow_interest_payment_fund_address": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.safety_factor": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.borrow_interest_payment_enabled": - return protoreflect.ValueOfBool(false) - case "elys.perpetual.LegacyParams.whitelisting_enabled": - return protoreflect.ValueOfBool(false) - case "elys.perpetual.LegacyParams.perpetual_swap_fee": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.max_limit_order": - return protoreflect.ValueOfInt64(int64(0)) - case "elys.perpetual.LegacyParams.fixed_funding_rate": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.minimum_long_take_profit_price_ratio": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.maximum_long_take_profit_price_ratio": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.maximum_short_take_profit_price_ratio": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.enable_take_profit_custody_liabilities": - return protoreflect.ValueOfBool(false) - case "elys.perpetual.LegacyParams.weight_breaking_fee_factor": - return protoreflect.ValueOfString("") - case "elys.perpetual.LegacyParams.enabled_pools": - list := []uint64{} - return protoreflect.ValueOfList(&_LegacyParams_22_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.LegacyParams")) - } - panic(fmt.Errorf("message elys.perpetual.LegacyParams 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_LegacyParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in elys.perpetual.LegacyParams", 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_LegacyParams) 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_LegacyParams) 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_LegacyParams) 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_LegacyParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LegacyParams) - 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.LeverageMax) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateMax) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateMin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateIncrease) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestRateDecrease) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HealthGainFactor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxOpenPositions != 0 { - n += 1 + runtime.Sov(uint64(x.MaxOpenPositions)) - } - l = len(x.PoolMaxLiabilitiesThreshold) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BorrowInterestPaymentFundPercentage) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LegacyBorrowInterestPaymentFundAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SafetyFactor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.BorrowInterestPaymentEnabled { - n += 2 - } - if x.WhitelistingEnabled { - n += 2 - } - l = len(x.PerpetualSwapFee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxLimitOrder != 0 { - n += 1 + runtime.Sov(uint64(x.MaxLimitOrder)) - } - l = len(x.FixedFundingRate) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinimumLongTakeProfitPriceRatio) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaximumLongTakeProfitPriceRatio) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaximumShortTakeProfitPriceRatio) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.EnableTakeProfitCustodyLiabilities { - n += 3 - } - l = len(x.WeightBreakingFeeFactor) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if len(x.EnabledPools) > 0 { - l = 0 - for _, e := range x.EnabledPools { - l += runtime.Sov(uint64(e)) - } - n += 2 + 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().(*LegacyParams) - 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.EnabledPools) > 0 { - var pksize2 int - for _, num := range x.EnabledPools { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.EnabledPools { - 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] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if len(x.WeightBreakingFeeFactor) > 0 { - i -= len(x.WeightBreakingFeeFactor) - copy(dAtA[i:], x.WeightBreakingFeeFactor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WeightBreakingFeeFactor))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if x.EnableTakeProfitCustodyLiabilities { - i-- - if x.EnableTakeProfitCustodyLiabilities { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if len(x.MaximumShortTakeProfitPriceRatio) > 0 { - i -= len(x.MaximumShortTakeProfitPriceRatio) - copy(dAtA[i:], x.MaximumShortTakeProfitPriceRatio) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaximumShortTakeProfitPriceRatio))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - if len(x.MaximumLongTakeProfitPriceRatio) > 0 { - i -= len(x.MaximumLongTakeProfitPriceRatio) - copy(dAtA[i:], x.MaximumLongTakeProfitPriceRatio) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaximumLongTakeProfitPriceRatio))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(x.MinimumLongTakeProfitPriceRatio) > 0 { - i -= len(x.MinimumLongTakeProfitPriceRatio) - copy(dAtA[i:], x.MinimumLongTakeProfitPriceRatio) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinimumLongTakeProfitPriceRatio))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(x.FixedFundingRate) > 0 { - i -= len(x.FixedFundingRate) - copy(dAtA[i:], x.FixedFundingRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FixedFundingRate))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if x.MaxLimitOrder != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxLimitOrder)) - i-- - dAtA[i] = 0x78 - } - if len(x.PerpetualSwapFee) > 0 { - i -= len(x.PerpetualSwapFee) - copy(dAtA[i:], x.PerpetualSwapFee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PerpetualSwapFee))) - i-- - dAtA[i] = 0x72 - } - if x.WhitelistingEnabled { - i-- - if x.WhitelistingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - if x.BorrowInterestPaymentEnabled { - i-- - if x.BorrowInterestPaymentEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if len(x.SafetyFactor) > 0 { - i -= len(x.SafetyFactor) - copy(dAtA[i:], x.SafetyFactor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SafetyFactor))) - i-- - dAtA[i] = 0x5a - } - if len(x.LegacyBorrowInterestPaymentFundAddress) > 0 { - i -= len(x.LegacyBorrowInterestPaymentFundAddress) - copy(dAtA[i:], x.LegacyBorrowInterestPaymentFundAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LegacyBorrowInterestPaymentFundAddress))) - i-- - dAtA[i] = 0x52 - } - if len(x.BorrowInterestPaymentFundPercentage) > 0 { - i -= len(x.BorrowInterestPaymentFundPercentage) - copy(dAtA[i:], x.BorrowInterestPaymentFundPercentage) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestPaymentFundPercentage))) - i-- - dAtA[i] = 0x4a - } - if len(x.PoolMaxLiabilitiesThreshold) > 0 { - i -= len(x.PoolMaxLiabilitiesThreshold) - copy(dAtA[i:], x.PoolMaxLiabilitiesThreshold) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PoolMaxLiabilitiesThreshold))) - i-- - dAtA[i] = 0x42 - } - if x.MaxOpenPositions != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxOpenPositions)) - i-- - dAtA[i] = 0x38 - } - if len(x.HealthGainFactor) > 0 { - i -= len(x.HealthGainFactor) - copy(dAtA[i:], x.HealthGainFactor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HealthGainFactor))) - i-- - dAtA[i] = 0x32 - } - if len(x.BorrowInterestRateDecrease) > 0 { - i -= len(x.BorrowInterestRateDecrease) - copy(dAtA[i:], x.BorrowInterestRateDecrease) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateDecrease))) - i-- - dAtA[i] = 0x2a - } - if len(x.BorrowInterestRateIncrease) > 0 { - i -= len(x.BorrowInterestRateIncrease) - copy(dAtA[i:], x.BorrowInterestRateIncrease) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateIncrease))) - i-- - dAtA[i] = 0x22 - } - if len(x.BorrowInterestRateMin) > 0 { - i -= len(x.BorrowInterestRateMin) - copy(dAtA[i:], x.BorrowInterestRateMin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateMin))) - i-- - dAtA[i] = 0x1a - } - if len(x.BorrowInterestRateMax) > 0 { - i -= len(x.BorrowInterestRateMax) - copy(dAtA[i:], x.BorrowInterestRateMax) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BorrowInterestRateMax))) - i-- - dAtA[i] = 0x12 - } - if len(x.LeverageMax) > 0 { - i -= len(x.LeverageMax) - copy(dAtA[i:], x.LeverageMax) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LeverageMax))) - 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().(*LegacyParams) - 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: LegacyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LegacyParams: 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 LeverageMax", 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.LeverageMax = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMax", 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.BorrowInterestRateMax = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMin", 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.BorrowInterestRateMin = 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 BorrowInterestRateIncrease", 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.BorrowInterestRateIncrease = 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 BorrowInterestRateDecrease", 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.BorrowInterestRateDecrease = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HealthGainFactor", 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.HealthGainFactor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxOpenPositions", wireType) - } - x.MaxOpenPositions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxOpenPositions |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PoolMaxLiabilitiesThreshold", 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.PoolMaxLiabilitiesThreshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentFundPercentage", 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.BorrowInterestPaymentFundPercentage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LegacyBorrowInterestPaymentFundAddress", 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.LegacyBorrowInterestPaymentFundAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SafetyFactor", 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.SafetyFactor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentEnabled", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.BorrowInterestPaymentEnabled = bool(v != 0) - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistingEnabled", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.WhitelistingEnabled = bool(v != 0) - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PerpetualSwapFee", 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.PerpetualSwapFee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxLimitOrder", wireType) - } - x.MaxLimitOrder = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxLimitOrder |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FixedFundingRate", 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.FixedFundingRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinimumLongTakeProfitPriceRatio", 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.MinimumLongTakeProfitPriceRatio = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumLongTakeProfitPriceRatio", 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.MaximumLongTakeProfitPriceRatio = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 19: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumShortTakeProfitPriceRatio", 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.MaximumShortTakeProfitPriceRatio = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EnableTakeProfitCustodyLiabilities", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EnableTakeProfitCustodyLiabilities = bool(v != 0) - case 21: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WeightBreakingFeeFactor", 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.WeightBreakingFeeFactor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 22: - if wireType == 0 { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EnabledPools = append(x.EnabledPools, 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.EnabledPools) == 0 { - x.EnabledPools = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EnabledPools = append(x.EnabledPools, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EnabledPools", 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 = (*_Params_20_list)(nil) type _Params_20_list struct { @@ -1918,6 +86,7 @@ var ( fd_Params_long_minimum_liability_amount protoreflect.FieldDescriptor fd_Params_exit_buffer protoreflect.FieldDescriptor fd_Params_taker_fee protoreflect.FieldDescriptor + fd_Params_number_per_block protoreflect.FieldDescriptor ) func init() { @@ -1947,6 +116,7 @@ func init() { fd_Params_long_minimum_liability_amount = md_Params.Fields().ByName("long_minimum_liability_amount") fd_Params_exit_buffer = md_Params.Fields().ByName("exit_buffer") fd_Params_taker_fee = md_Params.Fields().ByName("taker_fee") + fd_Params_number_per_block = md_Params.Fields().ByName("number_per_block") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -1958,7 +128,7 @@ func (x *Params) ProtoReflect() protoreflect.Message { } func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_elys_perpetual_params_proto_msgTypes[1] + mi := &file_elys_perpetual_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2158,6 +328,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.NumberPerBlock != uint64(0) { + value := protoreflect.ValueOfUint64(x.NumberPerBlock) + if !f(fd_Params_number_per_block, value) { + return + } + } } // Has reports whether a field is populated. @@ -2221,6 +397,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.ExitBuffer != "" case "elys.perpetual.Params.taker_fee": return x.TakerFee != "" + case "elys.perpetual.Params.number_per_block": + return x.NumberPerBlock != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2285,6 +463,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.ExitBuffer = "" case "elys.perpetual.Params.taker_fee": x.TakerFee = "" + case "elys.perpetual.Params.number_per_block": + x.NumberPerBlock = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2376,6 +556,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "elys.perpetual.Params.taker_fee": value := x.TakerFee return protoreflect.ValueOfString(value) + case "elys.perpetual.Params.number_per_block": + value := x.NumberPerBlock + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2446,6 +629,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.ExitBuffer = value.Interface().(string) case "elys.perpetual.Params.taker_fee": x.TakerFee = value.Interface().(string) + case "elys.perpetual.Params.number_per_block": + x.NumberPerBlock = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2518,6 +703,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field exit_buffer of message elys.perpetual.Params is not mutable")) case "elys.perpetual.Params.taker_fee": panic(fmt.Errorf("field taker_fee of message elys.perpetual.Params is not mutable")) + case "elys.perpetual.Params.number_per_block": + panic(fmt.Errorf("field number_per_block of message elys.perpetual.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2580,6 +767,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfString("") case "elys.perpetual.Params.taker_fee": return protoreflect.ValueOfString("") + case "elys.perpetual.Params.number_per_block": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.perpetual.Params")) @@ -2744,6 +933,9 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if l > 0 { n += 2 + l + runtime.Sov(uint64(l)) } + if x.NumberPerBlock != 0 { + n += 2 + runtime.Sov(uint64(x.NumberPerBlock)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2773,6 +965,13 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.NumberPerBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NumberPerBlock)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc8 + } if len(x.TakerFee) > 0 { i -= len(x.TakerFee) copy(dAtA[i:], x.TakerFee) @@ -3785,6 +1984,25 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.TakerFee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 25: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NumberPerBlock", wireType) + } + x.NumberPerBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.NumberPerBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3833,226 +2051,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type LegacyParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LeverageMax string `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3" json:"leverage_max,omitempty"` - BorrowInterestRateMax string `protobuf:"bytes,2,opt,name=borrow_interest_rate_max,json=borrowInterestRateMax,proto3" json:"borrow_interest_rate_max,omitempty"` - BorrowInterestRateMin string `protobuf:"bytes,3,opt,name=borrow_interest_rate_min,json=borrowInterestRateMin,proto3" json:"borrow_interest_rate_min,omitempty"` - BorrowInterestRateIncrease string `protobuf:"bytes,4,opt,name=borrow_interest_rate_increase,json=borrowInterestRateIncrease,proto3" json:"borrow_interest_rate_increase,omitempty"` - BorrowInterestRateDecrease string `protobuf:"bytes,5,opt,name=borrow_interest_rate_decrease,json=borrowInterestRateDecrease,proto3" json:"borrow_interest_rate_decrease,omitempty"` - HealthGainFactor string `protobuf:"bytes,6,opt,name=health_gain_factor,json=healthGainFactor,proto3" json:"health_gain_factor,omitempty"` - MaxOpenPositions int64 `protobuf:"varint,7,opt,name=max_open_positions,json=maxOpenPositions,proto3" json:"max_open_positions,omitempty"` - PoolMaxLiabilitiesThreshold string `protobuf:"bytes,8,opt,name=pool_max_liabilities_threshold,json=poolMaxLiabilitiesThreshold,proto3" json:"pool_max_liabilities_threshold,omitempty"` - BorrowInterestPaymentFundPercentage string `protobuf:"bytes,9,opt,name=borrow_interest_payment_fund_percentage,json=borrowInterestPaymentFundPercentage,proto3" json:"borrow_interest_payment_fund_percentage,omitempty"` - LegacyBorrowInterestPaymentFundAddress string `protobuf:"bytes,10,opt,name=legacy_borrow_interest_payment_fund_address,json=legacyBorrowInterestPaymentFundAddress,proto3" json:"legacy_borrow_interest_payment_fund_address,omitempty"` - SafetyFactor string `protobuf:"bytes,11,opt,name=safety_factor,json=safetyFactor,proto3" json:"safety_factor,omitempty"` - BorrowInterestPaymentEnabled bool `protobuf:"varint,12,opt,name=borrow_interest_payment_enabled,json=borrowInterestPaymentEnabled,proto3" json:"borrow_interest_payment_enabled,omitempty"` - WhitelistingEnabled bool `protobuf:"varint,13,opt,name=whitelisting_enabled,json=whitelistingEnabled,proto3" json:"whitelisting_enabled,omitempty"` - PerpetualSwapFee string `protobuf:"bytes,14,opt,name=perpetual_swap_fee,json=perpetualSwapFee,proto3" json:"perpetual_swap_fee,omitempty"` - MaxLimitOrder int64 `protobuf:"varint,15,opt,name=max_limit_order,json=maxLimitOrder,proto3" json:"max_limit_order,omitempty"` - FixedFundingRate string `protobuf:"bytes,16,opt,name=fixed_funding_rate,json=fixedFundingRate,proto3" json:"fixed_funding_rate,omitempty"` - // minimum value for take_profit_price/current price for long, should be - // greater than 1 - MinimumLongTakeProfitPriceRatio string `protobuf:"bytes,17,opt,name=minimum_long_take_profit_price_ratio,json=minimumLongTakeProfitPriceRatio,proto3" json:"minimum_long_take_profit_price_ratio,omitempty"` - // max value for take_profit_price/current price for long, should be greater - // than 1 - MaximumLongTakeProfitPriceRatio string `protobuf:"bytes,18,opt,name=maximum_long_take_profit_price_ratio,json=maximumLongTakeProfitPriceRatio,proto3" json:"maximum_long_take_profit_price_ratio,omitempty"` - // max value for take_profit_price/current price for short, should be less - // than 1 - MaximumShortTakeProfitPriceRatio string `protobuf:"bytes,19,opt,name=maximum_short_take_profit_price_ratio,json=maximumShortTakeProfitPriceRatio,proto3" json:"maximum_short_take_profit_price_ratio,omitempty"` - // No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in - // validate message - EnableTakeProfitCustodyLiabilities bool `protobuf:"varint,20,opt,name=enable_take_profit_custody_liabilities,json=enableTakeProfitCustodyLiabilities,proto3" json:"enable_take_profit_custody_liabilities,omitempty"` - // We create this and send this value to estimate swap ONLY when opening and - // closing the position Ideally this value is set to half. When trader open a - // position if they receive a weight balance bonus (which is half of weight - // breaking fee, ideally) then while closing position they are charged weight - // breaking fee. So we just directly apply half weight breaking fee on - // perpetual swaps Question: does each need to have separate value of this - // because PoolParams.WeightRecoveryFeePortion can be different Also, if - // trader has no bonus only fee, then overall we are only applying the fee - // half time - WeightBreakingFeeFactor string `protobuf:"bytes,21,opt,name=weight_breaking_fee_factor,json=weightBreakingFeeFactor,proto3" json:"weight_breaking_fee_factor,omitempty"` - EnabledPools []uint64 `protobuf:"varint,22,rep,packed,name=enabled_pools,json=enabledPools,proto3" json:"enabled_pools,omitempty"` -} - -func (x *LegacyParams) Reset() { - *x = LegacyParams{} - if protoimpl.UnsafeEnabled { - mi := &file_elys_perpetual_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LegacyParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LegacyParams) ProtoMessage() {} - -// Deprecated: Use LegacyParams.ProtoReflect.Descriptor instead. -func (*LegacyParams) Descriptor() ([]byte, []int) { - return file_elys_perpetual_params_proto_rawDescGZIP(), []int{0} -} - -func (x *LegacyParams) GetLeverageMax() string { - if x != nil { - return x.LeverageMax - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateMax() string { - if x != nil { - return x.BorrowInterestRateMax - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateMin() string { - if x != nil { - return x.BorrowInterestRateMin - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateIncrease() string { - if x != nil { - return x.BorrowInterestRateIncrease - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestRateDecrease() string { - if x != nil { - return x.BorrowInterestRateDecrease - } - return "" -} - -func (x *LegacyParams) GetHealthGainFactor() string { - if x != nil { - return x.HealthGainFactor - } - return "" -} - -func (x *LegacyParams) GetMaxOpenPositions() int64 { - if x != nil { - return x.MaxOpenPositions - } - return 0 -} - -func (x *LegacyParams) GetPoolMaxLiabilitiesThreshold() string { - if x != nil { - return x.PoolMaxLiabilitiesThreshold - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestPaymentFundPercentage() string { - if x != nil { - return x.BorrowInterestPaymentFundPercentage - } - return "" -} - -func (x *LegacyParams) GetLegacyBorrowInterestPaymentFundAddress() string { - if x != nil { - return x.LegacyBorrowInterestPaymentFundAddress - } - return "" -} - -func (x *LegacyParams) GetSafetyFactor() string { - if x != nil { - return x.SafetyFactor - } - return "" -} - -func (x *LegacyParams) GetBorrowInterestPaymentEnabled() bool { - if x != nil { - return x.BorrowInterestPaymentEnabled - } - return false -} - -func (x *LegacyParams) GetWhitelistingEnabled() bool { - if x != nil { - return x.WhitelistingEnabled - } - return false -} - -func (x *LegacyParams) GetPerpetualSwapFee() string { - if x != nil { - return x.PerpetualSwapFee - } - return "" -} - -func (x *LegacyParams) GetMaxLimitOrder() int64 { - if x != nil { - return x.MaxLimitOrder - } - return 0 -} - -func (x *LegacyParams) GetFixedFundingRate() string { - if x != nil { - return x.FixedFundingRate - } - return "" -} - -func (x *LegacyParams) GetMinimumLongTakeProfitPriceRatio() string { - if x != nil { - return x.MinimumLongTakeProfitPriceRatio - } - return "" -} - -func (x *LegacyParams) GetMaximumLongTakeProfitPriceRatio() string { - if x != nil { - return x.MaximumLongTakeProfitPriceRatio - } - return "" -} - -func (x *LegacyParams) GetMaximumShortTakeProfitPriceRatio() string { - if x != nil { - return x.MaximumShortTakeProfitPriceRatio - } - return "" -} - -func (x *LegacyParams) GetEnableTakeProfitCustodyLiabilities() bool { - if x != nil { - return x.EnableTakeProfitCustodyLiabilities - } - return false -} - -func (x *LegacyParams) GetWeightBreakingFeeFactor() string { - if x != nil { - return x.WeightBreakingFeeFactor - } - return "" -} - -func (x *LegacyParams) GetEnabledPools() []uint64 { - if x != nil { - return x.EnabledPools - } - return nil -} - type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4097,12 +2095,13 @@ type Params struct { LongMinimumLiabilityAmount string `protobuf:"bytes,22,opt,name=long_minimum_liability_amount,json=longMinimumLiabilityAmount,proto3" json:"long_minimum_liability_amount,omitempty"` ExitBuffer string `protobuf:"bytes,23,opt,name=exit_buffer,json=exitBuffer,proto3" json:"exit_buffer,omitempty"` TakerFee string `protobuf:"bytes,24,opt,name=taker_fee,json=takerFee,proto3" json:"taker_fee,omitempty"` + NumberPerBlock uint64 `protobuf:"varint,25,opt,name=number_per_block,json=numberPerBlock,proto3" json:"number_per_block,omitempty"` // Number of positions to process per block } func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { - mi := &file_elys_perpetual_params_proto_msgTypes[1] + mi := &file_elys_perpetual_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4116,7 +2115,7 @@ func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { - return file_elys_perpetual_params_proto_rawDescGZIP(), []int{1} + return file_elys_perpetual_params_proto_rawDescGZIP(), []int{0} } func (x *Params) GetLeverageMax() string { @@ -4287,6 +2286,13 @@ func (x *Params) GetTakerFee() string { return "" } +func (x *Params) GetNumberPerBlock() uint64 { + if x != nil { + return x.NumberPerBlock + } + return 0 +} + var File_elys_perpetual_params_proto protoreflect.FileDescriptor var file_elys_perpetual_params_proto_rawDesc = []byte{ @@ -4295,296 +2301,166 @@ var file_elys_perpetual_params_proto_rawDesc = []byte{ 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 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, 0xc6, - 0x10, 0x0a, 0x0c, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 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, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, - 0x67, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x61, - 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, 0x12, 0x74, 0x0a, + 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, + 0x12, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x78, 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, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x12, + 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, + 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, + 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, + 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, + 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, + 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, + 0x74, 0x52, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x04, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x63, 0x72, 0x65, - 0x61, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x72, - 0x65, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, + 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x72, 0x65, + 0x61, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x67, 0x61, + 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x47, 0x61, 0x69, 0x6e, 0x46, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x10, 0x6d, 0x61, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x76, 0x0a, 0x1e, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x62, - 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x5f, 0x67, 0x61, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x47, 0x61, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x61, - 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x4f, 0x70, 0x65, 0x6e, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x76, 0x0a, 0x1e, 0x70, 0x6f, 0x6f, 0x6c, - 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x1b, 0x70, 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x87, 0x01, 0x0a, 0x27, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x75, 0x6e, - 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1b, 0x70, + 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x87, 0x01, 0x0a, 0x27, 0x62, + 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, + 0x23, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x5f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, + 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x1f, + 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, + 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, + 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x23, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6e, 0x64, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5b, 0x0a, 0x2b, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x75, 0x6e, - 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x26, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6e, 0x64, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x73, 0x61, 0x66, 0x65, 0x74, - 0x79, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, - 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x0c, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x45, 0x0a, 0x1f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, - 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, - 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x70, 0x65, 0x72, - 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, - 0x75, 0x61, 0x6c, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, - 0x78, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x12, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, - 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, - 0x63, 0x52, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, - 0x61, 0x74, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, + 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x5f, 0x0a, 0x12, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, + 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, + 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, + 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, + 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, + 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, + 0x74, 0x69, 0x6f, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, - 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, - 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x82, 0x01, 0x0a, 0x25, 0x6d, 0x61, - 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x61, 0x6b, 0x65, - 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x20, 0x6d, 0x61, - 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x52, - 0x0a, 0x26, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x5f, 0x6c, 0x69, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x79, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x1a, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x17, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x46, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, - 0x6f, 0x6c, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x8c, 0x12, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6d, - 0x61, 0x78, 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, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0b, 0x6c, 0x65, 0x76, - 0x65, 0x72, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, - 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, - 0x65, 0x4d, 0x61, 0x78, 0x12, 0x6a, 0x0a, 0x18, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x82, 0x01, 0x0a, 0x25, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x15, 0x62, 0x6f, 0x72, 0x72, 0x6f, - 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, - 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x65, 0x49, 0x6e, - 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x64, - 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0x52, 0x1a, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, - 0x52, 0x61, 0x74, 0x65, 0x44, 0x65, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x12, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x67, 0x61, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x68, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x47, 0x61, 0x69, 0x6e, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, - 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x4f, 0x70, - 0x65, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x76, 0x0a, 0x1e, 0x70, - 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1b, 0x70, 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x78, 0x4c, - 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x87, 0x01, 0x0a, 0x27, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x66, 0x75, 0x6e, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x23, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, - 0x75, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, - 0x0d, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0c, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x46, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x45, 0x0a, 0x1f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, - 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, - 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x77, 0x68, 0x69, 0x74, - 0x65, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x5f, 0x0a, 0x12, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x77, 0x61, - 0x70, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, - 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, - 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x12, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x74, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x80, 0x01, 0x0a, - 0x24, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x74, 0x61, - 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x1f, - 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x6f, 0x6e, 0x67, 0x54, 0x61, 0x6b, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, - 0x82, 0x01, 0x0a, 0x25, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, - 0x74, 0x5f, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x5f, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x6e, 0x0a, 0x1a, 0x77, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, - 0x65, 0x63, 0x52, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, - 0x54, 0x61, 0x6b, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, - 0x61, 0x74, 0x69, 0x6f, 0x12, 0x6e, 0x0a, 0x1a, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x17, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x46, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, - 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x67, 0x0a, 0x16, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x14, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x6e, 0x0a, 0x1d, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x1a, 0x6c, 0x6f, 0x6e, 0x67, 0x4d, 0x69, 0x6e, 0x69, - 0x6d, 0x75, 0x6d, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, - 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, - 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x09, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, - 0x66, 0x65, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 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, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x08, 0x74, 0x61, - 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x42, 0xae, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x65, - 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, - 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x50, - 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, 0x5c, - 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, 0x65, - 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x52, 0x17, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x46, 0x65, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x14, 0x20, 0x03, + 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, + 0x12, 0x67, 0x0a, 0x16, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6e, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x14, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x6e, 0x0a, 0x1d, 0x6c, 0x6f, 0x6e, + 0x67, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x1a, 0x6c, + 0x6f, 0x6e, 0x67, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x69, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x65, 0x78, 0x69, + 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x4e, 0x0a, + 0x09, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x31, 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, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x08, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x46, 0x65, 0x65, 0x12, 0x28, 0x0a, + 0x10, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x50, + 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0xae, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x42, 0x0b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2d, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x76, 0x36, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, + 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x50, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xca, 0x02, 0x0e, 0x45, 0x6c, 0x79, 0x73, 0x5c, + 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0xe2, 0x02, 0x1a, 0x45, 0x6c, 0x79, 0x73, + 0x5c, 0x50, 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x50, + 0x65, 0x72, 0x70, 0x65, 0x74, 0x75, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4599,10 +2475,9 @@ func file_elys_perpetual_params_proto_rawDescGZIP() []byte { return file_elys_perpetual_params_proto_rawDescData } -var file_elys_perpetual_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_elys_perpetual_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_elys_perpetual_params_proto_goTypes = []interface{}{ - (*LegacyParams)(nil), // 0: elys.perpetual.LegacyParams - (*Params)(nil), // 1: elys.perpetual.Params + (*Params)(nil), // 0: elys.perpetual.Params } var file_elys_perpetual_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -4619,18 +2494,6 @@ func file_elys_perpetual_params_proto_init() { } if !protoimpl.UnsafeEnabled { file_elys_perpetual_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LegacyParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_elys_perpetual_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state @@ -4649,7 +2512,7 @@ func file_elys_perpetual_params_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_elys_perpetual_params_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/elys/masterchef/tx.proto b/proto/elys/masterchef/tx.proto index ddf50a960..c1294ef30 100644 --- a/proto/elys/masterchef/tx.proto +++ b/proto/elys/masterchef/tx.proto @@ -8,7 +8,6 @@ import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; - option go_package = "github.com/elys-network/elys/v6/x/masterchef/types"; // Msg defines the Msg service. @@ -111,5 +110,4 @@ message MsgToggleTakerFeeSwapAndBurn { string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } -message MsgToggleTakerFeeSwapAndBurnResponse { -} +message MsgToggleTakerFeeSwapAndBurnResponse {} diff --git a/x/masterchef/types/tx.pb.go b/x/masterchef/types/tx.pb.go index a9cef8f3c..9170374f4 100644 --- a/x/masterchef/types/tx.pb.go +++ b/x/masterchef/types/tx.pb.go @@ -8,8 +8,6 @@ import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -694,7 +692,6 @@ func (m *MsgToggleTakerFeeSwapAndBurn) GetSender() string { } type MsgToggleTakerFeeSwapAndBurnResponse struct { - BurntCoins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=burnt_coins,json=burntCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"burnt_coins"` } func (m *MsgToggleTakerFeeSwapAndBurnResponse) Reset() { *m = MsgToggleTakerFeeSwapAndBurnResponse{} } @@ -730,13 +727,6 @@ func (m *MsgToggleTakerFeeSwapAndBurnResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgToggleTakerFeeSwapAndBurnResponse proto.InternalMessageInfo -func (m *MsgToggleTakerFeeSwapAndBurnResponse) GetBurntCoins() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.BurntCoins - } - return nil -} - func init() { proto.RegisterType((*MsgAddExternalRewardDenom)(nil), "elys.masterchef.MsgAddExternalRewardDenom") proto.RegisterType((*MsgAddExternalRewardDenomResponse)(nil), "elys.masterchef.MsgAddExternalRewardDenomResponse") @@ -758,71 +748,67 @@ func init() { func init() { proto.RegisterFile("elys/masterchef/tx.proto", fileDescriptor_2574ed545e5b2c11) } var fileDescriptor_2574ed545e5b2c11 = []byte{ - // 1022 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xbf, 0x6f, 0xdb, 0x46, - 0x14, 0x36, 0x6d, 0x47, 0xb6, 0x9e, 0x83, 0x38, 0x25, 0x9c, 0x58, 0x52, 0x5d, 0xc9, 0x66, 0x02, - 0x54, 0x55, 0x21, 0xd2, 0x52, 0x11, 0x17, 0xd0, 0x66, 0xc5, 0x29, 0xe0, 0x22, 0x06, 0x5c, 0x26, - 0x59, 0xb2, 0x08, 0x94, 0x78, 0xa1, 0x09, 0x91, 0x77, 0xc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0x2b, 0x3f, 0x9d, 0x96, 0xa7, 0xde, 0x9d, 0x96, 0xa7, 0xfe, - 0x3a, 0x2d, 0x4f, 0xbd, 0x6c, 0x26, 0xc6, 0x2e, 0xf4, 0x50, 0xc7, 0x88, 0x1f, 0x10, 0xda, 0x17, - 0x0b, 0x63, 0x7f, 0xc3, 0x38, 0x4c, 0xfd, 0xa3, 0x0f, 0xc7, 0xb0, 0x9b, 0x13, 0xff, 0x94, 0xbf, - 0xf8, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x57, 0x7a, 0xdf, 0xf1, 0x0b, 0x00, 0x00, + // 947 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x4f, 0xdc, 0x46, + 0x14, 0xc6, 0x40, 0x16, 0xf6, 0x11, 0x85, 0xd4, 0x22, 0x61, 0xd7, 0xa5, 0x0b, 0x38, 0x51, 0xbb, + 0xdd, 0x6a, 0xd7, 0x61, 0xab, 0x50, 0x69, 0x6f, 0x6c, 0x49, 0x25, 0xaa, 0x20, 0x51, 0x27, 0xb9, + 0xe4, 0xb2, 0x32, 0xf6, 0xc4, 0x58, 0xd8, 0x33, 0xd6, 0xcc, 0x2c, 0x3f, 0xa4, 0x1e, 0xda, 0xde, + 0x9a, 0x53, 0xaf, 0xbd, 0xf7, 0x5e, 0x0e, 0xb9, 0xf5, 0x1f, 0xc8, 0xa1, 0x87, 0x28, 0xa7, 0xaa, + 0xaa, 0xa2, 0x0a, 0x0e, 0xfc, 0x1b, 0x91, 0x67, 0x8c, 0xd7, 0x66, 0x6d, 0x58, 0xf6, 0x92, 0xe0, + 0x79, 0x9f, 0xbf, 0xf7, 0xde, 0xf7, 0xbd, 0x37, 0x5e, 0xa8, 0x20, 0xff, 0x98, 0x19, 0x81, 0xc5, + 0x38, 0xa2, 0xf6, 0x1e, 0x7a, 0x65, 0xf0, 0xa3, 0x56, 0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+ 0x78, 0x43, 0xbc, 0xad, 0x2e, 0x41, 0x99, 0xf5, 0xc3, 0x90, 0x50, 0x8e, 0x9c, 0xca, 0xf4, 0x8a, + 0x52, 0x9f, 0x35, 0x07, 0x07, 0x9d, 0x6f, 0x7e, 0x39, 0x3f, 0x69, 0x0c, 0x8a, 0x7b, 0x7d, 0x7e, + 0xd2, 0x78, 0x98, 0x52, 0xb5, 0xb0, 0x7b, 0xfd, 0x01, 0xac, 0x16, 0x06, 0x4d, 0xc4, 0x42, 0x82, + 0x19, 0xd2, 0xff, 0x9e, 0x84, 0xc5, 0x2c, 0x6a, 0x0b, 0xdb, 0x08, 0x73, 0xef, 0x00, 0xa9, 0x8f, + 0xa0, 0xc4, 0x10, 0x76, 0x10, 0xbd, 0x56, 0xbb, 0x18, 0x37, 0x8a, 0x70, 0x8b, 0x30, 0x13, 0x12, + 0xe2, 0xf7, 0x3c, 0x47, 0xa8, 0x36, 0x6d, 0x96, 0xa2, 0xc7, 0x2d, 0x47, 0xfd, 0x0c, 0xe0, 0x15, + 0x25, 0x41, 0x6f, 0xd7, 0x27, 0xf6, 0xbe, 0x90, 0x61, 0xca, 0x2c, 0x47, 0x27, 0xdd, 0xe8, 0x40, + 0xad, 0xc2, 0x2c, 0x27, 0x71, 0xf0, 0x96, 0x08, 0xce, 0x70, 0x22, 0x43, 0x2f, 0xe0, 0xae, 0xf4, + 0xa1, 0x17, 0x22, 0x1a, 0x43, 0x4a, 0x37, 0x77, 0xe4, 0x8e, 0x24, 0xd9, 0x41, 0x54, 0xd0, 0x76, + 0xda, 0x91, 0xf0, 0x71, 0x67, 0x91, 0xea, 0x7a, 0xa1, 0xea, 0x89, 0x64, 0xfa, 0x2a, 0x2c, 0x17, + 0x84, 0x12, 0xc5, 0xff, 0x54, 0x60, 0x7e, 0x9b, 0xb9, 0x2f, 0x42, 0xc7, 0xe2, 0x68, 0x47, 0xec, + 0xc4, 0xd8, 0x83, 0xfa, 0x18, 0x4a, 0x72, 0xab, 0x84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, 0xcb, 0xd4, 0x2c, 0x26, 0xcc, 0x81, 0x6b, 0x8f, 0x6f, 0x04, 0xbf, 0xa8, 0x41, + 0xbb, 0xf5, 0xd3, 0xf9, 0x49, 0x43, 0xe9, 0x3e, 0x7d, 0x7b, 0x5a, 0x53, 0xde, 0x9d, 0xd6, 0x94, + 0xff, 0x4f, 0x6b, 0xca, 0x6f, 0x67, 0xb5, 0x89, 0x77, 0x67, 0xb5, 0x89, 0x7f, 0xce, 0x6a, 0x13, + 0x2f, 0xdb, 0xae, 0xc7, 0xf7, 0xfa, 0xbb, 0x2d, 0x9b, 0x04, 0x46, 0x94, 0xa1, 0x89, 0x11, 0x3f, + 0x24, 0x74, 0x5f, 0x3c, 0x18, 0x07, 0xeb, 0xc6, 0x51, 0xe6, 0x27, 0xf4, 0x71, 0x88, 0xd8, 0x6e, + 0x49, 0xfc, 0x74, 0xfd, 0xfa, 0x63, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xd7, 0xc1, 0xdb, 0x62, + 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1643,20 +1629,6 @@ func (m *MsgToggleTakerFeeSwapAndBurnResponse) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l - if len(m.BurntCoins) > 0 { - for iNdEx := len(m.BurntCoins) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BurntCoins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } @@ -1881,12 +1853,6 @@ func (m *MsgToggleTakerFeeSwapAndBurnResponse) Size() (n int) { } var l int _ = l - if len(m.BurntCoins) > 0 { - for _, e := range m.BurntCoins { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } return n } @@ -3293,40 +3259,6 @@ func (m *MsgToggleTakerFeeSwapAndBurnResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgToggleTakerFeeSwapAndBurnResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BurntCoins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BurntCoins = append(m.BurntCoins, types.Coin{}) - if err := m.BurntCoins[len(m.BurntCoins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/perpetual/client/cli/tx_close.go b/x/perpetual/client/cli/tx_close.go index d622d16d3..8956b4df9 100644 --- a/x/perpetual/client/cli/tx_close.go +++ b/x/perpetual/client/cli/tx_close.go @@ -15,9 +15,9 @@ import ( func CmdClose() *cobra.Command { cmd := &cobra.Command{ - Use: "close [mtp-id] [amount] [pool-id]", + Use: "close [mtp-id] [closingRatio] [pool-id]", Short: "Close perpetual position", - Example: `elysd tx perpetual close 1 10000000 --from=bob --yes --gas=1000000`, + Example: `elysd tx perpetual close 1 0.37 2 --from=bob --yes --gas=1000000`, Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientTxContext(cmd) @@ -34,9 +34,9 @@ func CmdClose() *cobra.Command { return errors.New("invalid mtp id") } - argAmount, ok := math.NewIntFromString(args[1]) - if !ok { - return errors.New("invalid amount") + argClosingRatio, err := math.LegacyNewDecFromStr(args[1]) + if err != nil { + return err } poolId, err := strconv.ParseUint(args[2], 10, 64) @@ -47,8 +47,9 @@ func CmdClose() *cobra.Command { msg := types.NewMsgClose( signer.String(), argMtpId, - argAmount, + math.ZeroInt(), poolId, + argClosingRatio, ) if err = msg.ValidateBasic(); err != nil { return err diff --git a/x/perpetual/genesis.go b/x/perpetual/genesis.go index 8229c7f41..a46d20955 100644 --- a/x/perpetual/genesis.go +++ b/x/perpetual/genesis.go @@ -35,6 +35,10 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) if err != nil { panic(err) } + + for _, elem := range genState.AdlCounter { + k.SetADLCounter(ctx, elem) + } } // ExportGenesis returns the module's exported genesis @@ -54,5 +58,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { } genesis.AddressWhitelist = whitelistAddresses + genesis.AdlCounter = k.GetAllADLCounter(ctx) + return genesis } diff --git a/x/perpetual/keeper/adl.go b/x/perpetual/keeper/adl.go index 129267244..2ea1cf5e4 100644 --- a/x/perpetual/keeper/adl.go +++ b/x/perpetual/keeper/adl.go @@ -91,23 +91,16 @@ func (k Keeper) ClosePositionsOnADL(ctx sdk.Context, perpetualPool types.Pool) e k.SetADLCounter(ctx, adlCounter) for _, mtp := range mtps { - ammPool, err := k.GetAmmPool(ctx, perpetualPool.AmmPoolId) - if err != nil { - return err - } msg := types.NewMsgClose(mtp.Address, mtp.Id, math.ZeroInt(), perpetualPool.AmmPoolId, closingRatio) - closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, err := k.ClosePosition(ctx, msg) + closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, closingPrice, closingCollateral, err := k.ClosePosition(ctx, msg) if err != nil { return err } - tradingAssetPrice, _, err := k.GetAssetPriceAndAssetUsdcDenomRatio(ctx, closedMtp.TradingAsset) + err = k.EmitClose(ctx, types.EventADLClose, closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, closingPrice, closingCollateral) if err != nil { return err } - - perpFeesInUsd, slippageFeesInUsd, weightBreakingFeesInUsd, takerFeesInUsd := k.GetPerpFeesInUSD(ctx, totalPerpetualFeesCoins) - } return nil } diff --git a/x/perpetual/keeper/close_position.go b/x/perpetual/keeper/close_position.go index 7acb814db..1ea8e836f 100644 --- a/x/perpetual/keeper/close_position.go +++ b/x/perpetual/keeper/close_position.go @@ -18,27 +18,27 @@ func (k Keeper) ClosePosition(ctx sdk.Context, msg *types.MsgClose) (types.MTP, return types.MTP{}, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), false, false, zeroPerpFees, math.LegacyZeroDec(), sdk.Coin{}, err } - closingCollatoral := sdk.NewCoin(mtp.CollateralAsset, mtp.Collateral) + initialCollateral := sdk.NewCoin(mtp.CollateralAsset, mtp.Collateral) pool, found := k.GetPool(ctx, mtp.AmmPoolId) if !found { - return mtp, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), false, false, zeroPerpFees, math.LegacyZeroDec(), closingCollatoral, errorsmod.Wrap(types.ErrPoolDoesNotExist, fmt.Sprintf("poolId: %d", mtp.AmmPoolId)) + return mtp, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), false, false, zeroPerpFees, math.LegacyZeroDec(), initialCollateral, errorsmod.Wrap(types.ErrPoolDoesNotExist, fmt.Sprintf("poolId: %d", mtp.AmmPoolId)) } // Retrieve AmmPool ammPool, err := k.GetAmmPool(ctx, mtp.AmmPoolId) if err != nil { - return mtp, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), false, false, zeroPerpFees, math.LegacyZeroDec(), closingCollatoral, err + return mtp, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), false, false, zeroPerpFees, math.LegacyZeroDec(), initialCollateral, err } // this also handles edge case where bot is unable to close position in time. repayAmt, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, perpetualFeesCoins, closingPrice, err := k.MTPTriggerChecksAndUpdates(ctx, &mtp, &pool, &ammPool) if err != nil { - return types.MTP{}, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), false, false, zeroPerpFees, math.LegacyZeroDec(), closingCollatoral, err + return types.MTP{}, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), false, false, zeroPerpFees, math.LegacyZeroDec(), initialCollateral, err } if forceClosed { - return mtp, repayAmt, math.LegacyOneDec(), returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, perpetualFeesCoins, closingPrice, closingCollatoral, nil + return mtp, repayAmt, math.LegacyOneDec(), returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, perpetualFeesCoins, closingPrice, initialCollateral, nil } // Should be declared after SettleMTPBorrowInterestUnpaidLiability and settling funding @@ -57,7 +57,7 @@ func (k Keeper) ClosePosition(ctx sdk.Context, msg *types.MsgClose) (types.MTP, // Estimate swap and repay repayAmt, returnAmt, perpFees, closingPrice, err := k.EstimateAndRepay(ctx, &mtp, &pool, &ammPool, closingRatio) if err != nil { - return mtp, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), allInterestsPaid, forceClosed, perpetualFeesCoins, math.LegacyZeroDec(), closingCollatoral, err + return mtp, math.ZeroInt(), math.LegacyZeroDec(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), math.ZeroInt(), allInterestsPaid, forceClosed, perpetualFeesCoins, math.LegacyZeroDec(), initialCollateral, err } perpetualFeesCoins = perpetualFeesCoins.Add(perpFees) @@ -65,9 +65,9 @@ func (k Keeper) ClosePosition(ctx sdk.Context, msg *types.MsgClose) (types.MTP, if k.hooks != nil { err = k.hooks.AfterPerpetualPositionClosed(ctx, ammPool, pool, creator, closingRatio, mtp.Id) if err != nil { - return mtp, math.Int{}, math.LegacyDec{}, math.Int{}, math.Int{}, math.Int{}, math.Int{}, math.Int{}, allInterestsPaid, forceClosed, zeroPerpFees, math.LegacyZeroDec(), closingCollatoral, err + return mtp, math.Int{}, math.LegacyDec{}, math.Int{}, math.Int{}, math.Int{}, math.Int{}, math.Int{}, allInterestsPaid, forceClosed, zeroPerpFees, math.LegacyZeroDec(), initialCollateral, err } } - return mtp, repayAmt, closingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, perpetualFeesCoins, closingPrice, closingCollatoral, nil + return mtp, repayAmt, closingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, perpetualFeesCoins, closingPrice, initialCollateral, nil } diff --git a/x/perpetual/keeper/estimate_and_repay.go b/x/perpetual/keeper/estimate_and_repay.go index 5a71b67f8..819f4391f 100644 --- a/x/perpetual/keeper/estimate_and_repay.go +++ b/x/perpetual/keeper/estimate_and_repay.go @@ -116,10 +116,10 @@ func (k Keeper) CalcReturnAmount(mtp types.MTP, repayAmount math.Int, closingRat // returnAmount is in custody asset // closingCollatoralCoin is the collateral coin before closing position -func (k Keeper) CalcNetPnLAtClosing(ctx sdk.Context, returnAmount math.Int, custodyAsset string, closingCollatoralCoin sdk.Coin, closingRatio math.LegacyDec) (netPnLInUSD math.LegacyDec) { +func (k Keeper) CalcNetPnLAtClosing(ctx sdk.Context, returnAmount math.Int, custodyAsset string, initialCollateral sdk.Coin, closingRatio math.LegacyDec) (netPnLInUSD math.LegacyDec) { - closedCollateralAmount := closingRatio.MulInt(closingCollatoralCoin.Amount).TruncateInt() - closedCollateralInUSD := k.amm.CalculateUSDValue(ctx, closingCollatoralCoin.Denom, closedCollateralAmount).Dec() + closedCollateralAmount := closingRatio.MulInt(initialCollateral.Amount).TruncateInt() + closedCollateralInUSD := k.amm.CalculateUSDValue(ctx, initialCollateral.Denom, closedCollateralAmount).Dec() // returnAmount will always be >=0 returnAmountInUSD := k.amm.CalculateUSDValue(ctx, custodyAsset, returnAmount).Dec() diff --git a/x/perpetual/keeper/events.go b/x/perpetual/keeper/events.go index 7fe5fbd33..8fa929f9e 100644 --- a/x/perpetual/keeper/events.go +++ b/x/perpetual/keeper/events.go @@ -8,20 +8,21 @@ import ( "github.com/elys-network/elys/v6/x/perpetual/types" ) -func (k Keeper) EmitForceClose(ctx sdk.Context, trigger string, mtp types.MTP, repayAmount, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt math.Int, closer string, allInterestsPaid bool, tradingAssetPrice math.LegacyDec, totalPerpetualFeesCoins types.PerpetualFees, closingPrice math.LegacyDec, closingCollatoral sdk.Coin, usdcPrice math.LegacyDec) { +func (k Keeper) EmitForceClose(ctx sdk.Context, trigger string, closedMtp types.MTP, repayAmount, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt math.Int, closer string, allInterestsPaid bool, tradingAssetPrice math.LegacyDec, totalPerpetualFeesCoins types.PerpetualFees, closingPrice math.LegacyDec, initialCollateral sdk.Coin, usdcPrice math.LegacyDec) { perpFeesInUsd, slippageFeesInUsd, weightBreakingFeesInUsd, takerFeesInUsd := k.GetPerpFeesInUSD(ctx, totalPerpetualFeesCoins) - netPnLInUSD := k.CalcNetPnLAtClosing(ctx, returnAmt, mtp.CustodyAsset, closingCollatoral, math.LegacyOneDec()) - interestAmtInUSD := k.amm.CalculateUSDValue(ctx, mtp.CustodyAsset, interestAmt).Dec() + netPnLInUSD := k.CalcNetPnLAtClosing(ctx, returnAmt, closedMtp.CustodyAsset, initialCollateral, math.LegacyOneDec()) + interestAmtInUSD := k.amm.CalculateUSDValue(ctx, closedMtp.CustodyAsset, interestAmt).Dec() ctx.EventManager().EmitEvent(sdk.NewEvent(types.EventForceClosed, - sdk.NewAttribute("mtp_id", strconv.FormatInt(int64(mtp.Id), 10)), - sdk.NewAttribute("owner", mtp.Address), - sdk.NewAttribute("amm_pool_id", strconv.FormatInt(int64(mtp.AmmPoolId), 10)), - sdk.NewAttribute("position", mtp.Position.String()), + sdk.NewAttribute("mtp_id", strconv.FormatInt(int64(closedMtp.Id), 10)), + sdk.NewAttribute("owner", closedMtp.Address), + sdk.NewAttribute("amm_pool_id", strconv.FormatInt(int64(closedMtp.AmmPoolId), 10)), + sdk.NewAttribute("position", closedMtp.Position.String()), sdk.NewAttribute("net_pnl", netPnLInUSD.String()), - sdk.NewAttribute("collateral_asset", mtp.CollateralAsset), - sdk.NewAttribute("collateral_amount", mtp.Collateral.String()), // collateral amount after closing + sdk.NewAttribute("collateral_asset", closedMtp.CollateralAsset), + sdk.NewAttribute("initial_collateral_amount", initialCollateral.Amount.String()), // collateral amount after closing + sdk.NewAttribute("final_collateral_amount", closedMtp.Collateral.String()), // collateral amount after closing sdk.NewAttribute("closer", closer), sdk.NewAttribute("closing_price", closingPrice.String()), sdk.NewAttribute("usdc_price", usdcPrice.String()), @@ -32,17 +33,22 @@ func (k Keeper) EmitForceClose(ctx sdk.Context, trigger string, mtp types.MTP, r sdk.NewAttribute("interest_amount", interestAmt.String()), sdk.NewAttribute("interest_amount_in_usd", interestAmtInUSD.String()), sdk.NewAttribute("insurance_amount", insuranceAmt.String()), - sdk.NewAttribute("funding_fee_paid_custody", mtp.FundingFeePaidCustody.String()), - sdk.NewAttribute("funding_fee_received_custody", mtp.FundingFeeReceivedCustody.String()), - sdk.NewAttribute("borrow_interest_paid_custody", mtp.BorrowInterestPaidCustody.String()), + sdk.NewAttribute("funding_fee_paid_custody", closedMtp.FundingFeePaidCustody.String()), + sdk.NewAttribute("funding_fee_received_custody", closedMtp.FundingFeeReceivedCustody.String()), + sdk.NewAttribute("borrow_interest_paid_custody", closedMtp.BorrowInterestPaidCustody.String()), sdk.NewAttribute("trading_asset_price", tradingAssetPrice.String()), sdk.NewAttribute("all_interests_paid", strconv.FormatBool(allInterestsPaid)), // Funding Fee is fully paid but interest amount is only partially paid then this will be false sdk.NewAttribute("trigger", trigger), - sdk.NewAttribute("open_price", mtp.OpenPrice.String()), - sdk.NewAttribute("closing_amount", mtp.Custody.String()), + sdk.NewAttribute("open_price", closedMtp.OpenPrice.String()), + sdk.NewAttribute("closing_amount", closedMtp.Custody.String()), sdk.NewAttribute(types.AttributeKeyPerpFee, perpFeesInUsd.String()), sdk.NewAttribute(types.AttributeKeySlippage, slippageFeesInUsd.String()), sdk.NewAttribute(types.AttributeKeyWeightBreakingFee, weightBreakingFeesInUsd.String()), sdk.NewAttribute(types.AttributeTakerFees, takerFeesInUsd.String()), )) } + +func (k Keeper) EmitClose(ctx sdk.Context, trigger string, closedMtp types.MTP, repayAmount math.Int, closingRatio math.LegacyDec, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt math.Int, allInterestsPaid, forceClosed bool, totalPerpetualFeesCoins types.PerpetualFees, closingPrice math.LegacyDec, initialCollateral sdk.Coin) error { + + return nil +} diff --git a/x/perpetual/migrations/v22_migration.go b/x/perpetual/migrations/v22_migration.go new file mode 100644 index 000000000..df67696e4 --- /dev/null +++ b/x/perpetual/migrations/v22_migration.go @@ -0,0 +1,15 @@ +package migrations + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (m Migrator) V22Migration(ctx sdk.Context) error { + params := m.keeper.GetParams(ctx) + params.NumberPerBlock = 5 + err := m.keeper.SetParams(ctx, ¶ms) + if err != nil { + return err + } + return nil +} diff --git a/x/perpetual/module.go b/x/perpetual/module.go index fb76acf52..3f8e2736f 100644 --- a/x/perpetual/module.go +++ b/x/perpetual/module.go @@ -125,7 +125,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := migrations.NewMigrator(am.keeper) - err := cfg.RegisterMigration(types.ModuleName, 20, m.V21Migration) + err := cfg.RegisterMigration(types.ModuleName, 21, m.V22Migration) if err != nil { panic(err) } @@ -152,7 +152,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 -func (AppModule) ConsensusVersion() uint64 { return 21 } +func (AppModule) ConsensusVersion() uint64 { return 22 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(gotCtx context.Context) error { diff --git a/x/perpetual/types/events.go b/x/perpetual/types/events.go index fcc0d7c1c..402b30f98 100644 --- a/x/perpetual/types/events.go +++ b/x/perpetual/types/events.go @@ -10,7 +10,7 @@ const ( EventPaidFromInsuranceFund = "perpetual_mtp_paid_from_insurance_fund" EventInsufficientInsuranceFund = "perpetual_mtp_insufficient_insurance_fund" EventAddCollateral = "perpetual_mtp_add_collateral" - EventPerpetualFees = "perpetual_fees" + EventADLClose = "perpetual_adl_close" EventClosePositions = "perpetual_close_positions" ) diff --git a/x/perpetual/types/params.pb.go b/x/perpetual/types/params.pb.go index 8b0b9bc1e..6b2de4c08 100644 --- a/x/perpetual/types/params.pb.go +++ b/x/perpetual/types/params.pb.go @@ -25,130 +25,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type LegacyParams struct { - LeverageMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"` - BorrowInterestRateMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=borrow_interest_rate_max,json=borrowInterestRateMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_max"` - BorrowInterestRateMin cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=borrow_interest_rate_min,json=borrowInterestRateMin,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_min"` - BorrowInterestRateIncrease cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=borrow_interest_rate_increase,json=borrowInterestRateIncrease,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_increase"` - BorrowInterestRateDecrease cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=borrow_interest_rate_decrease,json=borrowInterestRateDecrease,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_decrease"` - HealthGainFactor cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=health_gain_factor,json=healthGainFactor,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"health_gain_factor"` - MaxOpenPositions int64 `protobuf:"varint,7,opt,name=max_open_positions,json=maxOpenPositions,proto3" json:"max_open_positions,omitempty"` - PoolMaxLiabilitiesThreshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=pool_max_liabilities_threshold,json=poolMaxLiabilitiesThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"pool_max_liabilities_threshold"` - BorrowInterestPaymentFundPercentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=borrow_interest_payment_fund_percentage,json=borrowInterestPaymentFundPercentage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_payment_fund_percentage"` - LegacyBorrowInterestPaymentFundAddress string `protobuf:"bytes,10,opt,name=legacy_borrow_interest_payment_fund_address,json=legacyBorrowInterestPaymentFundAddress,proto3" json:"legacy_borrow_interest_payment_fund_address,omitempty"` - SafetyFactor cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=safety_factor,json=safetyFactor,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"safety_factor"` - BorrowInterestPaymentEnabled bool `protobuf:"varint,12,opt,name=borrow_interest_payment_enabled,json=borrowInterestPaymentEnabled,proto3" json:"borrow_interest_payment_enabled,omitempty"` - WhitelistingEnabled bool `protobuf:"varint,13,opt,name=whitelisting_enabled,json=whitelistingEnabled,proto3" json:"whitelisting_enabled,omitempty"` - PerpetualSwapFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=perpetual_swap_fee,json=perpetualSwapFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"perpetual_swap_fee"` - MaxLimitOrder int64 `protobuf:"varint,15,opt,name=max_limit_order,json=maxLimitOrder,proto3" json:"max_limit_order,omitempty"` - FixedFundingRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,16,opt,name=fixed_funding_rate,json=fixedFundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fixed_funding_rate"` - // minimum value for take_profit_price/current price for long, should be - // greater than 1 - MinimumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,17,opt,name=minimum_long_take_profit_price_ratio,json=minimumLongTakeProfitPriceRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minimum_long_take_profit_price_ratio"` - // max value for take_profit_price/current price for long, should be greater - // than 1 - MaximumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,18,opt,name=maximum_long_take_profit_price_ratio,json=maximumLongTakeProfitPriceRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maximum_long_take_profit_price_ratio"` - // max value for take_profit_price/current price for short, should be less - // than 1 - MaximumShortTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `protobuf:"bytes,19,opt,name=maximum_short_take_profit_price_ratio,json=maximumShortTakeProfitPriceRatio,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maximum_short_take_profit_price_ratio"` - // No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in - // validate message - EnableTakeProfitCustodyLiabilities bool `protobuf:"varint,20,opt,name=enable_take_profit_custody_liabilities,json=enableTakeProfitCustodyLiabilities,proto3" json:"enable_take_profit_custody_liabilities,omitempty"` - // We create this and send this value to estimate swap ONLY when opening and - // closing the position Ideally this value is set to half. When trader open a - // position if they receive a weight balance bonus (which is half of weight - // breaking fee, ideally) then while closing position they are charged weight - // breaking fee. So we just directly apply half weight breaking fee on - // perpetual swaps Question: does each need to have separate value of this - // because PoolParams.WeightRecoveryFeePortion can be different Also, if - // trader has no bonus only fee, then overall we are only applying the fee - // half time - WeightBreakingFeeFactor cosmossdk_io_math.LegacyDec `protobuf:"bytes,21,opt,name=weight_breaking_fee_factor,json=weightBreakingFeeFactor,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight_breaking_fee_factor"` - EnabledPools []uint64 `protobuf:"varint,22,rep,packed,name=enabled_pools,json=enabledPools,proto3" json:"enabled_pools,omitempty"` -} - -func (m *LegacyParams) Reset() { *m = LegacyParams{} } -func (m *LegacyParams) String() string { return proto.CompactTextString(m) } -func (*LegacyParams) ProtoMessage() {} -func (*LegacyParams) Descriptor() ([]byte, []int) { - return fileDescriptor_032040a5fba82242, []int{0} -} -func (m *LegacyParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LegacyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LegacyParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LegacyParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_LegacyParams.Merge(m, src) -} -func (m *LegacyParams) XXX_Size() int { - return m.Size() -} -func (m *LegacyParams) XXX_DiscardUnknown() { - xxx_messageInfo_LegacyParams.DiscardUnknown(m) -} - -var xxx_messageInfo_LegacyParams proto.InternalMessageInfo - -func (m *LegacyParams) GetMaxOpenPositions() int64 { - if m != nil { - return m.MaxOpenPositions - } - return 0 -} - -func (m *LegacyParams) GetLegacyBorrowInterestPaymentFundAddress() string { - if m != nil { - return m.LegacyBorrowInterestPaymentFundAddress - } - return "" -} - -func (m *LegacyParams) GetBorrowInterestPaymentEnabled() bool { - if m != nil { - return m.BorrowInterestPaymentEnabled - } - return false -} - -func (m *LegacyParams) GetWhitelistingEnabled() bool { - if m != nil { - return m.WhitelistingEnabled - } - return false -} - -func (m *LegacyParams) GetMaxLimitOrder() int64 { - if m != nil { - return m.MaxLimitOrder - } - return 0 -} - -func (m *LegacyParams) GetEnableTakeProfitCustodyLiabilities() bool { - if m != nil { - return m.EnableTakeProfitCustodyLiabilities - } - return false -} - -func (m *LegacyParams) GetEnabledPools() []uint64 { - if m != nil { - return m.EnabledPools - } - return nil -} - type Params struct { LeverageMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"` BorrowInterestRateMax cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=borrow_interest_rate_max,json=borrowInterestRateMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"borrow_interest_rate_max"` @@ -189,13 +65,14 @@ type Params struct { LongMinimumLiabilityAmount cosmossdk_io_math.Int `protobuf:"bytes,22,opt,name=long_minimum_liability_amount,json=longMinimumLiabilityAmount,proto3,customtype=cosmossdk.io/math.Int" json:"long_minimum_liability_amount"` ExitBuffer cosmossdk_io_math.LegacyDec `protobuf:"bytes,23,opt,name=exit_buffer,json=exitBuffer,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"exit_buffer"` TakerFee cosmossdk_io_math.LegacyDec `protobuf:"bytes,24,opt,name=taker_fee,json=takerFee,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"taker_fee"` + NumberPerBlock uint64 `protobuf:"varint,25,opt,name=number_per_block,json=numberPerBlock,proto3" json:"number_per_block,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_032040a5fba82242, []int{1} + return fileDescriptor_032040a5fba82242, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -259,80 +136,79 @@ func (m *Params) GetEnabledPools() []uint64 { return nil } +func (m *Params) GetNumberPerBlock() uint64 { + if m != nil { + return m.NumberPerBlock + } + return 0 +} + func init() { - proto.RegisterType((*LegacyParams)(nil), "elys.perpetual.LegacyParams") proto.RegisterType((*Params)(nil), "elys.perpetual.Params") } func init() { proto.RegisterFile("elys/perpetual/params.proto", fileDescriptor_032040a5fba82242) } var fileDescriptor_032040a5fba82242 = []byte{ - // 986 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x98, 0xc1, 0x6f, 0x1b, 0xc5, - 0x17, 0xc7, 0xb3, 0xbf, 0xf4, 0x17, 0x92, 0x89, 0x93, 0xb8, 0x13, 0x27, 0x5d, 0x1c, 0xea, 0x58, - 0x29, 0x84, 0x48, 0xa5, 0xb6, 0x22, 0x24, 0xee, 0x35, 0xa9, 0x51, 0x44, 0xd2, 0x5a, 0xdb, 0xa8, - 0x07, 0x38, 0x8c, 0xc6, 0xbb, 0xcf, 0xeb, 0xc1, 0xbb, 0x33, 0xab, 0x99, 0x71, 0x6c, 0xdf, 0x10, - 0x17, 0x2e, 0x1c, 0xf8, 0x63, 0xf8, 0x1b, 0x50, 0x8f, 0x15, 0x27, 0xc4, 0xa1, 0x42, 0xc9, 0x3f, - 0x82, 0x66, 0x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05, 0x8f, 0x46, 0xe4, 0x94, - 0x46, 0x7d, 0xc8, 0x7f, 0x45, 0x28, 0x65, 0xc0, 0xc7, 0x19, 0xef, 0x99, 0xc1, 0x61, 0x8e, 0xee, - 0xa6, 0x9b, 0x3f, 0x49, 0xc6, 0xac, 0xe6, 0x8d, 0x08, 0x8d, 0x45, 0x9f, 0x6b, 0x77, 0x33, 0xd5, - 0xbb, 0x9f, 0xe9, 0x6d, 0x5c, 0xd4, 0x3b, 0xe4, 0x7a, 0x4a, 0xe9, 0x90, 0x6b, 0xaf, 0x6c, 0x88, - 0xc7, 0x59, 0xfa, 0x8d, 0x79, 0x0f, 0x53, 0x1c, 0xf6, 0xd0, 0x32, 0x0c, 0x99, 0x26, 0xed, 0x7e, - 0xa7, 0x03, 0xd2, 0xbd, 0x93, 0xf7, 0x69, 0x90, 0xa1, 0x34, 0x52, 0x08, 0x7e, 0x8c, 0x96, 0x4c, - 0xde, 0xc8, 0xb4, 0x5a, 0xb8, 0x79, 0x89, 0x8b, 0x29, 0xa3, 0x09, 0xd0, 0xf8, 0xfc, 0xf9, 0x59, - 0xc5, 0x79, 0x71, 0x56, 0x71, 0x7e, 0x3d, 0xab, 0x38, 0xdf, 0x9f, 0x57, 0xe6, 0x5e, 0x9c, 0x57, - 0xe6, 0x7e, 0x3e, 0xaf, 0xcc, 0x7d, 0xb1, 0x1f, 0x32, 0xdd, 0xed, 0xb7, 0x6b, 0xbe, 0x88, 0xeb, - 0x10, 0x8d, 0xd4, 0x03, 0x0e, 0x7a, 0x20, 0x64, 0x2f, 0xfd, 0x53, 0x3f, 0xfd, 0xa4, 0x3e, 0x9c, - 0xfa, 0xd8, 0xa3, 0x47, 0x09, 0xa8, 0xf6, 0x42, 0xfa, 0xad, 0xe6, 0xe3, 0xdf, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x47, 0x86, 0xff, 0xf3, 0x0b, 0x12, 0x00, 0x00, + // 874 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0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x83, 0x8c, 0xe9, 0xa4, 0x7f, 0x0a, 0x31, + 0x0b, 0xe7, 0xc7, 0x10, 0xfe, 0xfe, 0xeb, 0x63, 0xe4, 0xa8, 0xc7, 0x10, 0xfa, 0x1b, 0x0d, 0xe6, + 0x8c, 0x55, 0xf8, 0x07, 0x44, 0x02, 0xa9, 0x94, 0x9c, 0x51, 0x2e, 0x34, 0x28, 0x28, 0x34, 0x55, + 0x4c, 0x5b, 0x85, 0xf7, 0xda, 0x2a, 0xec, 0x59, 0xe4, 0x89, 0x23, 0xfa, 0x4c, 0xff, 0xbf, 0x16, + 0x17, 0x64, 0xf9, 0x5d, 0x6a, 0x71, 0x81, 0x35, 0x7a, 0x78, 0xa3, 0x16, 0x17, 0xa1, 0x02, 0x56, + 0x00, 0x59, 0x69, 0x2b, 0xb8, 0xff, 0xa6, 0xe0, 0x89, 0x83, 0xde, 0xaa, 0x3a, 0x01, 0xa7, 0xfa, + 0xfe, 0x3b, 0x54, 0x3d, 0x76, 0x50, 0x4c, 0x11, 0x4e, 0x80, 0xa5, 0x3a, 0xa1, 0x31, 0xe3, 0x82, + 0x46, 0x2c, 0xd4, 0x52, 0x91, 0xd5, 0xb6, 0x52, 0x3b, 0x16, 0xf6, 0x2d, 0xe3, 0x62, 0x54, 0xa3, + 0xf0, 0x97, 0x08, 0x67, 0xac, 0xa2, 0x32, 0x07, 0x41, 0x73, 0x59, 0x70, 0xcd, 0xa5, 0x28, 0xc8, + 0x07, 0x5d, 0xaf, 0xb7, 0xec, 0xef, 0x64, 0xac, 0x7a, 0x96, 0x83, 0x18, 0x37, 0x71, 0x7c, 0x81, + 0x3a, 0xb9, 0x94, 0xa9, 0x69, 0x21, 0x9a, 0x72, 0x16, 0xf0, 0x94, 0x6b, 0x0e, 0x05, 0xd5, 0x89, + 0x82, 0x22, 0x91, 0xe9, 0x84, 0xac, 0xb5, 0xb5, 0x76, 0x60, 0xc0, 0x67, 0xac, 0x3a, 0xfd, 0x07, + 0x7b, 0xde, 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 0xc6, 0x61, + 0x1f, 0x6d, 0x40, 0xc5, 0x35, 0x0d, 0xca, 0x28, 0x02, 0x45, 0xee, 0xb7, 0xfd, 0x1a, 0x64, 0x28, + 0xc3, 0x1a, 0x82, 0x9f, 0xa2, 0x75, 0xd3, 0x37, 0xaa, 0xde, 0x16, 0xa4, 0x2d, 0x71, 0xad, 0x66, + 0x98, 0x2d, 0xd1, 0x43, 0x3b, 0xa2, 0xcc, 0x02, 0x50, 0x66, 0x97, 0xd3, 0x20, 0x95, 0xe1, 0x94, + 0x3c, 0xe8, 0x7a, 0xbd, 0x15, 0x7f, 0xdb, 0xc6, 0xc7, 0xa0, 0x86, 0x26, 0x3a, 0xfc, 0xee, 0xe5, + 0x65, 0xc7, 0x7b, 0x75, 0xd9, 0xf1, 0xfe, 0xba, 0xec, 0x78, 0xbf, 0x5c, 0x75, 0x96, 0x5e, 0x5d, + 0x75, 0x96, 0xfe, 0xb8, 0xea, 0x2c, 0x7d, 0x7f, 0x14, 0x73, 0x9d, 0x94, 0x41, 0x3f, 0x94, 0xd9, + 0xc0, 0x5c, 0xcf, 0x1e, 0x0b, 0xd0, 0x33, 0xa9, 0xa6, 0xf5, 0xc3, 0xe0, 0xe2, 0xeb, 0x41, 0x75, + 0xed, 0x36, 0xa7, 0xe7, 0x39, 0x14, 0xc1, 0x6a, 0x7d, 0x19, 0xfb, 0xea, 0xef, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x1b, 0x01, 0x91, 0x33, 0xec, 0x09, 0x00, 0x00, } -func (m *LegacyParams) Marshal() (dAtA []byte, err error) { +func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -342,64 +218,27 @@ func (m *LegacyParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LegacyParams) MarshalTo(dAtA []byte) (int, error) { +func (m *Params) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.EnabledPools) > 0 { - dAtA2 := make([]byte, len(m.EnabledPools)*10) - var j1 int - for _, num := range m.EnabledPools { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintParams(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - { - size := m.WeightBreakingFeeFactor.Size() - i -= size - if _, err := m.WeightBreakingFeeFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - if m.EnableTakeProfitCustodyLiabilities { - i-- - if m.EnableTakeProfitCustodyLiabilities { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.NumberPerBlock != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.NumberPerBlock)) i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xa0 + dAtA[i] = 0xc8 } { - size := m.MaximumShortTakeProfitPriceRatio.Size() + size := m.TakerFee.Size() i -= size - if _, err := m.MaximumShortTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.TakerFee.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -407,11 +246,11 @@ func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x9a + dAtA[i] = 0xc2 { - size := m.MaximumLongTakeProfitPriceRatio.Size() + size := m.ExitBuffer.Size() i -= size - if _, err := m.MaximumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.ExitBuffer.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -419,11 +258,11 @@ func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x92 + dAtA[i] = 0xba { - size := m.MinimumLongTakeProfitPriceRatio.Size() + size := m.LongMinimumLiabilityAmount.Size() i -= size - if _, err := m.MinimumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.LongMinimumLiabilityAmount.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -431,11 +270,11 @@ func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x8a + dAtA[i] = 0xb2 { - size := m.FixedFundingRate.Size() + size := m.MinimumNotionalValue.Size() i -= size - if _, err := m.FixedFundingRate.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.MinimumNotionalValue.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) @@ -443,1339 +282,303 @@ func (m *LegacyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x82 - if m.MaxLimitOrder != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxLimitOrder)) - i-- - dAtA[i] = 0x78 - } - { - size := m.PerpetualSwapFee.Size() - i -= size - if _, err := m.PerpetualSwapFee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - if m.WhitelistingEnabled { - i-- - if m.WhitelistingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - if m.BorrowInterestPaymentEnabled { - i-- - if m.BorrowInterestPaymentEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0xaa + if len(m.EnabledPools) > 0 { + dAtA2 := make([]byte, len(m.EnabledPools)*10) + var j1 int + for _, num := range m.EnabledPools { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintParams(dAtA, i, uint64(j1)) i-- - dAtA[i] = 0x60 - } - { - size := m.SafetyFactor.Size() - i -= size - if _, err := m.SafetyFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - if len(m.LegacyBorrowInterestPaymentFundAddress) > 0 { - i -= len(m.LegacyBorrowInterestPaymentFundAddress) - copy(dAtA[i:], m.LegacyBorrowInterestPaymentFundAddress) - i = encodeVarintParams(dAtA, i, uint64(len(m.LegacyBorrowInterestPaymentFundAddress))) + dAtA[i] = 0x1 i-- - dAtA[i] = 0x52 - } - { - size := m.BorrowInterestPaymentFundPercentage.Size() - i -= size - if _, err := m.BorrowInterestPaymentFundPercentage.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) + dAtA[i] = 0xa2 } - i-- - dAtA[i] = 0x4a { - size := m.PoolMaxLiabilitiesThreshold.Size() + size := m.WeightBreakingFeeFactor.Size() i -= size - if _, err := m.PoolMaxLiabilitiesThreshold.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.WeightBreakingFeeFactor.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 - if m.MaxOpenPositions != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxOpenPositions)) - i-- - dAtA[i] = 0x38 - } - { - size := m.HealthGainFactor.Size() - i -= size - if _, err := m.HealthGainFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } + dAtA[i] = 0x1 i-- - dAtA[i] = 0x32 + dAtA[i] = 0x9a { - size := m.BorrowInterestRateDecrease.Size() + size := m.MaximumShortTakeProfitPriceRatio.Size() i -= size - if _, err := m.BorrowInterestRateDecrease.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.MaximumShortTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - { - size := m.BorrowInterestRateIncrease.Size() - i -= size - if _, err := m.BorrowInterestRateIncrease.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } + dAtA[i] = 0x1 i-- - dAtA[i] = 0x22 + dAtA[i] = 0x92 { - size := m.BorrowInterestRateMin.Size() + size := m.MaximumLongTakeProfitPriceRatio.Size() i -= size - if _, err := m.BorrowInterestRateMin.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.MaximumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintParams(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x1a - { - size := m.BorrowInterestRateMax.Size() - i -= size - if _, err := m.BorrowInterestRateMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.LeverageMax.Size() - i -= size - if _, err := m.LeverageMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.TakerFee.Size() - i -= size - if _, err := m.TakerFee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - { - size := m.ExitBuffer.Size() - i -= size - if _, err := m.ExitBuffer.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - { - size := m.LongMinimumLiabilityAmount.Size() - i -= size - if _, err := m.LongMinimumLiabilityAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - { - size := m.MinimumNotionalValue.Size() - i -= size - if _, err := m.MinimumNotionalValue.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - if len(m.EnabledPools) > 0 { - dAtA4 := make([]byte, len(m.EnabledPools)*10) - var j3 int - for _, num := range m.EnabledPools { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintParams(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - { - size := m.WeightBreakingFeeFactor.Size() - i -= size - if _, err := m.WeightBreakingFeeFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - { - size := m.MaximumShortTakeProfitPriceRatio.Size() - i -= size - if _, err := m.MaximumShortTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - { - size := m.MaximumLongTakeProfitPriceRatio.Size() - i -= size - if _, err := m.MaximumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - { - size := m.MinimumLongTakeProfitPriceRatio.Size() - i -= size - if _, err := m.MinimumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - { - size := m.FixedFundingRate.Size() - i -= size - if _, err := m.FixedFundingRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if m.MaxLimitOrder != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxLimitOrder)) - i-- - dAtA[i] = 0x70 - } - { - size := m.PerpetualSwapFee.Size() - i -= size - if _, err := m.PerpetualSwapFee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - if m.WhitelistingEnabled { - i-- - if m.WhitelistingEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if m.BorrowInterestPaymentEnabled { - i-- - if m.BorrowInterestPaymentEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - { - size := m.SafetyFactor.Size() - i -= size - if _, err := m.SafetyFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size := m.BorrowInterestPaymentFundPercentage.Size() - i -= size - if _, err := m.BorrowInterestPaymentFundPercentage.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size := m.PoolMaxLiabilitiesThreshold.Size() - i -= size - if _, err := m.PoolMaxLiabilitiesThreshold.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - if m.MaxOpenPositions != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxOpenPositions)) - i-- - dAtA[i] = 0x38 - } - { - size := m.HealthGainFactor.Size() - i -= size - if _, err := m.HealthGainFactor.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.BorrowInterestRateDecrease.Size() - i -= size - if _, err := m.BorrowInterestRateDecrease.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.BorrowInterestRateIncrease.Size() - i -= size - if _, err := m.BorrowInterestRateIncrease.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.BorrowInterestRateMin.Size() - i -= size - if _, err := m.BorrowInterestRateMin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.BorrowInterestRateMax.Size() - i -= size - if _, err := m.BorrowInterestRateMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.LeverageMax.Size() - i -= size - if _, err := m.LeverageMax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *LegacyParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.LeverageMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMin.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateIncrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateDecrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.HealthGainFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxOpenPositions != 0 { - n += 1 + sovParams(uint64(m.MaxOpenPositions)) - } - l = m.PoolMaxLiabilitiesThreshold.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestPaymentFundPercentage.Size() - n += 1 + l + sovParams(uint64(l)) - l = len(m.LegacyBorrowInterestPaymentFundAddress) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = m.SafetyFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.BorrowInterestPaymentEnabled { - n += 2 - } - if m.WhitelistingEnabled { - n += 2 - } - l = m.PerpetualSwapFee.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxLimitOrder != 0 { - n += 1 + sovParams(uint64(m.MaxLimitOrder)) - } - l = m.FixedFundingRate.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MinimumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumShortTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - if m.EnableTakeProfitCustodyLiabilities { - n += 3 - } - l = m.WeightBreakingFeeFactor.Size() - n += 2 + l + sovParams(uint64(l)) - if len(m.EnabledPools) > 0 { - l = 0 - for _, e := range m.EnabledPools { - l += sovParams(uint64(e)) - } - n += 2 + sovParams(uint64(l)) + l - } - return n -} - -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.LeverageMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMax.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateMin.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateIncrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestRateDecrease.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.HealthGainFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxOpenPositions != 0 { - n += 1 + sovParams(uint64(m.MaxOpenPositions)) - } - l = m.PoolMaxLiabilitiesThreshold.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.BorrowInterestPaymentFundPercentage.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.SafetyFactor.Size() - n += 1 + l + sovParams(uint64(l)) - if m.BorrowInterestPaymentEnabled { - n += 2 - } - if m.WhitelistingEnabled { - n += 2 - } - l = m.PerpetualSwapFee.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxLimitOrder != 0 { - n += 1 + sovParams(uint64(m.MaxLimitOrder)) - } - l = m.FixedFundingRate.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.MinimumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumLongTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.MaximumShortTakeProfitPriceRatio.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.WeightBreakingFeeFactor.Size() - n += 2 + l + sovParams(uint64(l)) - if len(m.EnabledPools) > 0 { - l = 0 - for _, e := range m.EnabledPools { - l += sovParams(uint64(e)) - } - n += 2 + sovParams(uint64(l)) + l - } - l = m.MinimumNotionalValue.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.LongMinimumLiabilityAmount.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.ExitBuffer.Size() - n += 2 + l + sovParams(uint64(l)) - l = m.TakerFee.Size() - n += 2 + l + sovParams(uint64(l)) - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *LegacyParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LegacyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LegacyParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LeverageMax", 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 - } - if err := m.LeverageMax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMax", 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 - } - if err := m.BorrowInterestRateMax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateMin", 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 - } - if err := m.BorrowInterestRateMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateIncrease", 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 - } - if err := m.BorrowInterestRateIncrease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestRateDecrease", 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 - } - if err := m.BorrowInterestRateDecrease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HealthGainFactor", 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 - } - if err := m.HealthGainFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxOpenPositions", wireType) - } - m.MaxOpenPositions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxOpenPositions |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolMaxLiabilitiesThreshold", 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 - } - if err := m.PoolMaxLiabilitiesThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentFundPercentage", 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 - } - if err := m.BorrowInterestPaymentFundPercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LegacyBorrowInterestPaymentFundAddress", 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.LegacyBorrowInterestPaymentFundAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SafetyFactor", 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 - } - if err := m.SafetyFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BorrowInterestPaymentEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BorrowInterestPaymentEnabled = bool(v != 0) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WhitelistingEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.WhitelistingEnabled = bool(v != 0) - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PerpetualSwapFee", 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 - } - if err := m.PerpetualSwapFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxLimitOrder", wireType) - } - m.MaxLimitOrder = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxLimitOrder |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedFundingRate", 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 - } - if err := m.FixedFundingRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumLongTakeProfitPriceRatio", 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 - } - if err := m.MinimumLongTakeProfitPriceRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumLongTakeProfitPriceRatio", 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 - } - if err := m.MaximumLongTakeProfitPriceRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumShortTakeProfitPriceRatio", 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 - } - if err := m.MaximumShortTakeProfitPriceRatio.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableTakeProfitCustodyLiabilities", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableTakeProfitCustodyLiabilities = bool(v != 0) - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WeightBreakingFeeFactor", 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 - } - if err := m.WeightBreakingFeeFactor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnabledPools = append(m.EnabledPools, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.EnabledPools) == 0 { - m.EnabledPools = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnabledPools = append(m.EnabledPools, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field EnabledPools", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + { + size := m.MinimumLongTakeProfitPriceRatio.Size() + i -= size + if _, err := m.MinimumLongTakeProfitPriceRatio.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size := m.FixedFundingRate.Size() + i -= size + if _, err := m.FixedFundingRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.MaxLimitOrder != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxLimitOrder)) + i-- + dAtA[i] = 0x70 + } + { + size := m.PerpetualSwapFee.Size() + i -= size + if _, err := m.PerpetualSwapFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + if m.WhitelistingEnabled { + i-- + if m.WhitelistingEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.BorrowInterestPaymentEnabled { + i-- + if m.BorrowInterestPaymentEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + { + size := m.SafetyFactor.Size() + i -= size + if _, err := m.SafetyFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.BorrowInterestPaymentFundPercentage.Size() + i -= size + if _, err := m.BorrowInterestPaymentFundPercentage.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.PoolMaxLiabilitiesThreshold.Size() + i -= size + if _, err := m.PoolMaxLiabilitiesThreshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if m.MaxOpenPositions != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxOpenPositions)) + i-- + dAtA[i] = 0x38 + } + { + size := m.HealthGainFactor.Size() + i -= size + if _, err := m.HealthGainFactor.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.BorrowInterestRateDecrease.Size() + i -= size + if _, err := m.BorrowInterestRateDecrease.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.BorrowInterestRateIncrease.Size() + i -= size + if _, err := m.BorrowInterestRateIncrease.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.BorrowInterestRateMin.Size() + i -= size + if _, err := m.BorrowInterestRateMin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.BorrowInterestRateMax.Size() + i -= size + if _, err := m.BorrowInterestRateMax.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.LeverageMax.Size() + i -= size + if _, err := m.LeverageMax.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintParams(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return nil + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LeverageMax.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateMax.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateMin.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateIncrease.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestRateDecrease.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.HealthGainFactor.Size() + n += 1 + l + sovParams(uint64(l)) + if m.MaxOpenPositions != 0 { + n += 1 + sovParams(uint64(m.MaxOpenPositions)) + } + l = m.PoolMaxLiabilitiesThreshold.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BorrowInterestPaymentFundPercentage.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.SafetyFactor.Size() + n += 1 + l + sovParams(uint64(l)) + if m.BorrowInterestPaymentEnabled { + n += 2 + } + if m.WhitelistingEnabled { + n += 2 + } + l = m.PerpetualSwapFee.Size() + n += 1 + l + sovParams(uint64(l)) + if m.MaxLimitOrder != 0 { + n += 1 + sovParams(uint64(m.MaxLimitOrder)) + } + l = m.FixedFundingRate.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.MinimumLongTakeProfitPriceRatio.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.MaximumLongTakeProfitPriceRatio.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.MaximumShortTakeProfitPriceRatio.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.WeightBreakingFeeFactor.Size() + n += 2 + l + sovParams(uint64(l)) + if len(m.EnabledPools) > 0 { + l = 0 + for _, e := range m.EnabledPools { + l += sovParams(uint64(e)) + } + n += 2 + sovParams(uint64(l)) + l + } + l = m.MinimumNotionalValue.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.LongMinimumLiabilityAmount.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.ExitBuffer.Size() + n += 2 + l + sovParams(uint64(l)) + l = m.TakerFee.Size() + n += 2 + l + sovParams(uint64(l)) + if m.NumberPerBlock != 0 { + n += 2 + sovParams(uint64(m.NumberPerBlock)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -2606,6 +1409,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberPerBlock", wireType) + } + m.NumberPerBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumberPerBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) From d7580ecbdd673ed8aa0e1f2ebddc85003e8395dc Mon Sep 17 00:00:00 2001 From: avkr003 Date: Tue, 22 Jul 2025 04:11:34 +0530 Subject: [PATCH 3/4] fixing test cases --- x/perpetual/keeper/adl.go | 7 +- x/perpetual/keeper/begin_blocker_test.go | 2 +- x/perpetual/keeper/close.go | 51 +----------- x/perpetual/keeper/close_test.go | 81 ++++++++++--------- x/perpetual/keeper/end_blocker.go | 17 ++++ x/perpetual/keeper/events.go | 55 ++++++++++++- x/perpetual/keeper/force_close_test.go | 2 +- .../keeper/get_net_open_interest_test.go | 2 +- x/perpetual/keeper/hooks_leveragelp.go | 3 +- x/perpetual/keeper/keeper_test.go | 4 +- x/perpetual/keeper/params.go | 11 --- x/perpetual/keeper/pool_health_test.go | 4 +- x/perpetual/keeper/pool_test.go | 2 +- .../query_get_positions_for_address_test.go | 19 ----- x/perpetual/migrations/v22_migration.go | 7 ++ x/perpetual/module.go | 3 +- x/perpetual/types/events.go | 1 - x/perpetual/types/pool.go | 3 +- x/perpetual/types/pool_test.go | 12 +-- x/tier/keeper/keeper_test.go | 2 +- x/tradeshield/keeper/keeper_test.go | 2 +- 21 files changed, 151 insertions(+), 139 deletions(-) create mode 100644 x/perpetual/keeper/end_blocker.go diff --git a/x/perpetual/keeper/adl.go b/x/perpetual/keeper/adl.go index 2ea1cf5e4..25f6b6bf4 100644 --- a/x/perpetual/keeper/adl.go +++ b/x/perpetual/keeper/adl.go @@ -54,6 +54,9 @@ func (k Keeper) ClosePositionsOnADL(ctx sdk.Context, perpetualPool types.Pool) e // process will never end. adl trigger stops that by being higher currentMaxLiabilitiesRatio := math.LegacyMaxDec(perpetualPool.BaseAssetLiabilitiesRatio, perpetualPool.QuoteAssetLiabilitiesRatio) params := k.GetParams(ctx) + if currentMaxLiabilitiesRatio.LTE(params.PoolMaxLiabilitiesThreshold) { + return nil + } closingRatio := currentMaxLiabilitiesRatio.Sub(params.PoolMaxLiabilitiesThreshold).Quo(currentMaxLiabilitiesRatio) if closingRatio.IsZero() || closingRatio.IsNegative() { err := fmt.Errorf("closing ratio is <= 0 for pool while triggering adl for pool id %d in perpetual", perpetualPool.AmmPoolId) @@ -92,12 +95,12 @@ func (k Keeper) ClosePositionsOnADL(ctx sdk.Context, perpetualPool types.Pool) e for _, mtp := range mtps { msg := types.NewMsgClose(mtp.Address, mtp.Id, math.ZeroInt(), perpetualPool.AmmPoolId, closingRatio) - closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, closingPrice, closingCollateral, err := k.ClosePosition(ctx, msg) + closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, closingPrice, initialCollateral, initialCustody, initialLiabilities, err := k.ClosePosition(ctx, msg) if err != nil { return err } - err = k.EmitClose(ctx, types.EventADLClose, closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, closingPrice, closingCollateral) + err = k.EmitClose(ctx, "adl", closedMtp, repayAmount, finalClosingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, closingPrice, initialCollateral, initialCustody, initialLiabilities) if err != nil { return err } diff --git a/x/perpetual/keeper/begin_blocker_test.go b/x/perpetual/keeper/begin_blocker_test.go index 9a467f5e7..fddaf5a29 100644 --- a/x/perpetual/keeper/begin_blocker_test.go +++ b/x/perpetual/keeper/begin_blocker_test.go @@ -45,7 +45,7 @@ func (suite *PerpetualKeeperTestSuite) TestComputeFundingRate() { }, }, } - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("5.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("5.5"), math.LegacyMustNewDecFromStr("0.67")) pool.PoolAssetsLong = []types.PoolAsset{ { Liabilities: math.NewInt(0), diff --git a/x/perpetual/keeper/close.go b/x/perpetual/keeper/close.go index 0bffc2295..2319ee094 100644 --- a/x/perpetual/keeper/close.go +++ b/x/perpetual/keeper/close.go @@ -1,8 +1,6 @@ package keeper import ( - "strconv" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/elys-network/elys/v6/x/perpetual/types" ) @@ -13,58 +11,11 @@ func (k Keeper) Close(ctx sdk.Context, msg *types.MsgClose) (*types.MsgCloseResp return nil, err } - tradingAssetPrice, _, err := k.GetAssetPriceAndAssetUsdcDenomRatio(ctx, closedMtp.TradingAsset) + err = k.EmitClose(ctx, "tx", closedMtp, repayAmount, closingRatio, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt, allInterestsPaid, forceClosed, totalPerpetualFeesCoins, closingPrice, initialCollateral, initialCustody, initialLiabilities) if err != nil { return nil, err } - perpFeesInUsd, slippageFeesInUsd, weightBreakingFeesInUsd, takerFeesInUsd := k.GetPerpFeesInUSD(ctx, totalPerpetualFeesCoins) - interestAmtInUSD := k.amm.CalculateUSDValue(ctx, closedMtp.CustodyAsset, interestAmt).Dec() - - netPnLInUSD := k.CalcNetPnLAtClosing(ctx, returnAmt, closedMtp.CustodyAsset, initialCollateral, closingRatio) - usdcPrice, err := k.GetUSDCPrice(ctx) - if err != nil { - return nil, err - } - - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EventClose, - sdk.NewAttribute("mtp_id", strconv.FormatInt(int64(closedMtp.Id), 10)), - sdk.NewAttribute("owner", closedMtp.Address), - sdk.NewAttribute("amm_pool_id", strconv.FormatInt(int64(closedMtp.AmmPoolId), 10)), - sdk.NewAttribute("net_pnl", netPnLInUSD.String()), - sdk.NewAttribute("collateral_asset", closedMtp.CollateralAsset), - sdk.NewAttribute("initial_collateral_amount", initialCollateral.Amount.String()), - sdk.NewAttribute("final_collateral_amount", closedMtp.Collateral.String()), - sdk.NewAttribute("initial_custody_amount", initialCustody.String()), - sdk.NewAttribute("final_custody_amount", closedMtp.Custody.String()), - sdk.NewAttribute("initial_liabilities_amount", initialLiabilities.String()), - sdk.NewAttribute("final_liabilities_amount", closedMtp.Liabilities.String()), - sdk.NewAttribute("position", closedMtp.Position.String()), - sdk.NewAttribute("mtp_health", closedMtp.MtpHealth.String()), // should be there if it's partial close - sdk.NewAttribute("repay_amount", repayAmount.String()), - sdk.NewAttribute("return_amount", returnAmt.String()), - sdk.NewAttribute("funding_fee_amount", fundingFeeAmt.String()), - sdk.NewAttribute("funding_amount_distributed", fundingAmtDistributed.String()), - sdk.NewAttribute("interest_amount", interestAmt.String()), - sdk.NewAttribute("interest_amount_in_usd", interestAmtInUSD.String()), - sdk.NewAttribute("insurance_amount", insuranceAmt.String()), - sdk.NewAttribute("funding_fee_paid_custody", closedMtp.FundingFeePaidCustody.String()), - sdk.NewAttribute("funding_fee_received_custody", closedMtp.FundingFeeReceivedCustody.String()), - sdk.NewAttribute("borrow_interest_paid_custody", closedMtp.BorrowInterestPaidCustody.String()), - sdk.NewAttribute("closing_ratio", closingRatio.String()), - sdk.NewAttribute("closing_price", closingPrice.String()), - sdk.NewAttribute("open_price", closedMtp.OpenPrice.String()), - sdk.NewAttribute("usdc_price", usdcPrice.String()), - sdk.NewAttribute("trading_asset_price", tradingAssetPrice.String()), - sdk.NewAttribute("all_interests_paid", strconv.FormatBool(allInterestsPaid)), // Funding Fee is fully paid but interest amount is only partially paid then this will be false - sdk.NewAttribute("force_closed", strconv.FormatBool(forceClosed)), - sdk.NewAttribute(types.AttributeKeyPerpFee, perpFeesInUsd.String()), - sdk.NewAttribute(types.AttributeKeySlippage, slippageFeesInUsd.String()), - sdk.NewAttribute(types.AttributeKeyWeightBreakingFee, weightBreakingFeesInUsd.String()), - sdk.NewAttribute(types.AttributeTakerFees, takerFeesInUsd.String()), - )) - return &types.MsgCloseResponse{ Id: closedMtp.Id, Amount: repayAmount, diff --git a/x/perpetual/keeper/close_test.go b/x/perpetual/keeper/close_test.go index 6034311fc..989e6f2f4 100644 --- a/x/perpetual/keeper/close_test.go +++ b/x/perpetual/keeper/close_test.go @@ -23,10 +23,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { "mtp not found", func() *types.MsgClose { return &types.MsgClose{ - Creator: sample.AccAddress(), - Id: uint64(10), - Amount: math.NewInt(12000), - PoolId: 1, + Creator: sample.AccAddress(), + Id: uint64(10), + Amount: math.NewInt(12000), + PoolId: 1, + ClosingRatio: math.LegacyZeroDec(), } }, "mtp not found", @@ -54,10 +55,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { suite.Require().NoError(err) suite.app.AssetprofileKeeper.RemoveEntry(suite.ctx, ptypes.BaseCurrency) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(500), - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(500), + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "asset info uusdc not found", @@ -87,10 +89,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { suite.Require().NoError(err) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(50000000000000), // same as with amount 399 - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(50000000000000), // same as with amount 399 + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "", @@ -127,10 +130,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { }) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(107), - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(107), + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "", @@ -167,10 +171,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { }) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(699), - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(699), + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "", @@ -207,10 +212,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { }) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(699), - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(699), + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "", @@ -238,10 +244,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { position, err := suite.app.PerpetualKeeper.Open(suite.ctx, openPositionMsg) suite.Require().NoError(err) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(699), - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(699), + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "", @@ -267,10 +274,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { position, err := suite.app.PerpetualKeeper.Open(suite.ctx, openPositionMsg) suite.Require().NoError(err) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(900), - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(900), + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "", @@ -342,10 +350,11 @@ func (suite *PerpetualKeeperTestSuite) TestClose() { }) return &types.MsgClose{ - Creator: positionCreator.String(), - Id: position.Id, - Amount: math.NewInt(900), - PoolId: ammPool.PoolId, + Creator: positionCreator.String(), + Id: position.Id, + Amount: math.NewInt(900), + PoolId: ammPool.PoolId, + ClosingRatio: math.LegacyZeroDec(), } }, "not enough liquidity", diff --git a/x/perpetual/keeper/end_blocker.go b/x/perpetual/keeper/end_blocker.go new file mode 100644 index 000000000..87b9fe941 --- /dev/null +++ b/x/perpetual/keeper/end_blocker.go @@ -0,0 +1,17 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k Keeper) EndBlocker(ctx sdk.Context) { + pools := k.GetAllPools(ctx) + + for _, pool := range pools { + cacheCtx, write := ctx.CacheContext() + err := k.ClosePositionsOnADL(cacheCtx, pool) + if err == nil { + write() + } + } +} diff --git a/x/perpetual/keeper/events.go b/x/perpetual/keeper/events.go index 719bd374c..51b70b074 100644 --- a/x/perpetual/keeper/events.go +++ b/x/perpetual/keeper/events.go @@ -51,7 +51,60 @@ func (k Keeper) EmitForceClose(ctx sdk.Context, trigger string, closedMTP types. )) } -func (k Keeper) EmitClose(ctx sdk.Context, trigger string, closedMtp types.MTP, repayAmount math.Int, closingRatio math.LegacyDec, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt math.Int, allInterestsPaid, forceClosed bool, totalPerpetualFeesCoins types.PerpetualFees, closingPrice math.LegacyDec, initialCollateral sdk.Coin) error { +func (k Keeper) EmitClose(ctx sdk.Context, trigger string, closedMtp types.MTP, repayAmount math.Int, closingRatio math.LegacyDec, returnAmt, fundingFeeAmt, fundingAmtDistributed, interestAmt, insuranceAmt math.Int, allInterestsPaid, forceClosed bool, totalPerpetualFeesCoins types.PerpetualFees, closingPrice math.LegacyDec, initialCollateral sdk.Coin, initialCustody, initialLiabilities math.Int) error { + + tradingAssetPrice, _, err := k.GetAssetPriceAndAssetUsdcDenomRatio(ctx, closedMtp.TradingAsset) + if err != nil { + return err + } + + perpFeesInUsd, slippageFeesInUsd, weightBreakingFeesInUsd, takerFeesInUsd := k.GetPerpFeesInUSD(ctx, totalPerpetualFeesCoins) + interestAmtInUSD := k.amm.CalculateUSDValue(ctx, closedMtp.CustodyAsset, interestAmt).Dec() + + netPnLInUSD := k.CalcNetPnLAtClosing(ctx, returnAmt, closedMtp.CustodyAsset, initialCollateral, closingRatio) + usdcPrice, err := k.GetUSDCPrice(ctx) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent(types.EventClose, + sdk.NewAttribute("mtp_id", strconv.FormatInt(int64(closedMtp.Id), 10)), + sdk.NewAttribute("owner", closedMtp.Address), + sdk.NewAttribute("amm_pool_id", strconv.FormatInt(int64(closedMtp.AmmPoolId), 10)), + sdk.NewAttribute("net_pnl", netPnLInUSD.String()), + sdk.NewAttribute("collateral_asset", closedMtp.CollateralAsset), + sdk.NewAttribute("initial_collateral_amount", initialCollateral.Amount.String()), + sdk.NewAttribute("final_collateral_amount", closedMtp.Collateral.String()), + sdk.NewAttribute("initial_custody_amount", initialCustody.String()), + sdk.NewAttribute("final_custody_amount", closedMtp.Custody.String()), + sdk.NewAttribute("initial_liabilities_amount", initialLiabilities.String()), + sdk.NewAttribute("final_liabilities_amount", closedMtp.Liabilities.String()), + sdk.NewAttribute("position", closedMtp.Position.String()), + sdk.NewAttribute("mtp_health", closedMtp.MtpHealth.String()), // should be there if it's partial close + sdk.NewAttribute("repay_amount", repayAmount.String()), + sdk.NewAttribute("return_amount", returnAmt.String()), + sdk.NewAttribute("funding_fee_amount", fundingFeeAmt.String()), + sdk.NewAttribute("funding_amount_distributed", fundingAmtDistributed.String()), + sdk.NewAttribute("interest_amount", interestAmt.String()), + sdk.NewAttribute("interest_amount_in_usd", interestAmtInUSD.String()), + sdk.NewAttribute("insurance_amount", insuranceAmt.String()), + sdk.NewAttribute("funding_fee_paid_custody", closedMtp.FundingFeePaidCustody.String()), + sdk.NewAttribute("funding_fee_received_custody", closedMtp.FundingFeeReceivedCustody.String()), + sdk.NewAttribute("borrow_interest_paid_custody", closedMtp.BorrowInterestPaidCustody.String()), + sdk.NewAttribute("closing_ratio", closingRatio.String()), + sdk.NewAttribute("closing_price", closingPrice.String()), + sdk.NewAttribute("open_price", closedMtp.OpenPrice.String()), + sdk.NewAttribute("usdc_price", usdcPrice.String()), + sdk.NewAttribute("trading_asset_price", tradingAssetPrice.String()), + sdk.NewAttribute("all_interests_paid", strconv.FormatBool(allInterestsPaid)), // Funding Fee is fully paid but interest amount is only partially paid then this will be false + sdk.NewAttribute("force_closed", strconv.FormatBool(forceClosed)), + sdk.NewAttribute("trigger", trigger), + sdk.NewAttribute(types.AttributeKeyPerpFee, perpFeesInUsd.String()), + sdk.NewAttribute(types.AttributeKeySlippage, slippageFeesInUsd.String()), + sdk.NewAttribute(types.AttributeKeyWeightBreakingFee, weightBreakingFeesInUsd.String()), + sdk.NewAttribute(types.AttributeTakerFees, takerFeesInUsd.String()), + )) return nil } diff --git a/x/perpetual/keeper/force_close_test.go b/x/perpetual/keeper/force_close_test.go index 5fef8977d..cfe8fe527 100644 --- a/x/perpetual/keeper/force_close_test.go +++ b/x/perpetual/keeper/force_close_test.go @@ -37,7 +37,7 @@ func (suite *PerpetualKeeperTestSuite) TestForceCloseShort_Successful() { _, err := leveragelpmodulekeeper.NewMsgServerImpl(*suite.app.LeveragelpKeeper).AddPool(ctx, &enablePoolMsg) suite.Require().NoError(err) - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("5.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("5.5"), math.LegacyMustNewDecFromStr("0.67")) k.SetPool(ctx, pool) openPositionMsg := &types.MsgOpen{ diff --git a/x/perpetual/keeper/get_net_open_interest_test.go b/x/perpetual/keeper/get_net_open_interest_test.go index d38ec86a3..4aeec3c98 100644 --- a/x/perpetual/keeper/get_net_open_interest_test.go +++ b/x/perpetual/keeper/get_net_open_interest_test.go @@ -19,7 +19,7 @@ func (suite *PerpetualKeeperTestSuite) TestGetFundingPaymentRates() { }, }, } - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("5.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("5.5"), math.LegacyMustNewDecFromStr("0.67")) pool.PoolAssetsLong = []types.PoolAsset{ { Liabilities: math.NewInt(0), diff --git a/x/perpetual/keeper/hooks_leveragelp.go b/x/perpetual/keeper/hooks_leveragelp.go index 6b4571a6e..6ad8a4172 100644 --- a/x/perpetual/keeper/hooks_leveragelp.go +++ b/x/perpetual/keeper/hooks_leveragelp.go @@ -1,6 +1,7 @@ package keeper import ( + "cosmossdk.io/math" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,7 +12,7 @@ import ( func (k Keeper) OnLeverageLpEnablePool(ctx sdk.Context, ammPool ammtypes.Pool) error { params := k.GetParams(ctx) - pool := types.NewPool(ammPool, params.LeverageMax) + pool := types.NewPool(ammPool, params.LeverageMax, params.PoolMaxLiabilitiesThreshold.Add(math.LegacyMustNewDecFromStr("0.02"))) k.SetPool(ctx, pool) return nil } diff --git a/x/perpetual/keeper/keeper_test.go b/x/perpetual/keeper/keeper_test.go index f7037b846..3100f1c18 100644 --- a/x/perpetual/keeper/keeper_test.go +++ b/x/perpetual/keeper/keeper_test.go @@ -132,7 +132,7 @@ func (suite *PerpetualKeeperTestSuite) ResetAndSetSuite(addr []sdk.AccAddress, u suite.AddAccounts(len(addr), addr) poolCreator := addr[0] ammPool := suite.CreateNewAmmPool(poolCreator, useOracle, osmomath.ZeroBigDec(), osmomath.ZeroBigDec(), ptypes.ATOM, baseTokenAmount, assetAmount) - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("10.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("10.5"), math.LegacyMustNewDecFromStr("0.67")) suite.app.PerpetualKeeper.SetPool(suite.ctx, pool) params := suite.app.PerpetualKeeper.GetParams(suite.ctx) params.BorrowInterestRateMin = math.LegacyMustNewDecFromStr("0.12") @@ -324,7 +324,7 @@ func (suite *PerpetualKeeperTestSuite) SetPerpetualPool(poolId uint64) (types.Po _, err := leveragelpmodulekeeper.NewMsgServerImpl(*suite.app.LeveragelpKeeper).AddPool(ctx, &enablePoolMsg) suite.Require().NoError(err) - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11"), math.LegacyMustNewDecFromStr("0.67")) k.SetPool(ctx, pool) params := suite.app.PerpetualKeeper.GetParams(suite.ctx) diff --git a/x/perpetual/keeper/params.go b/x/perpetual/keeper/params.go index d57a86bff..b85478b7e 100644 --- a/x/perpetual/keeper/params.go +++ b/x/perpetual/keeper/params.go @@ -36,17 +36,6 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { return params } -func (k Keeper) GetLegacyParams(ctx sdk.Context) (params types.LegacyParams) { - store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) - bz := store.Get(types.KeyPrefix(types.ParamsKey)) - if bz == nil { - return params - } - - k.cdc.MustUnmarshal(bz, ¶ms) - return params -} - func (k Keeper) GetMaxLeverageParam(ctx sdk.Context) sdkmath.LegacyDec { return k.GetParams(ctx).LeverageMax } diff --git a/x/perpetual/keeper/pool_health_test.go b/x/perpetual/keeper/pool_health_test.go index f28e1a72b..268aac7a8 100644 --- a/x/perpetual/keeper/pool_health_test.go +++ b/x/perpetual/keeper/pool_health_test.go @@ -33,7 +33,7 @@ func (suite *PerpetualKeeperTestSuite) TestCheckLowPoolHealth() { "Pool health is low LONG", "pool (1) base asset liabilities ratio (0.950000000000000000) too high for the operation", func() { - pool := types.NewPool(ammPool, sdkmath.LegacyMustNewDecFromStr("10.5")) + pool := types.NewPool(ammPool, sdkmath.LegacyMustNewDecFromStr("10.5"), sdkmath.LegacyMustNewDecFromStr("0.67")) pool.BaseAssetLiabilitiesRatio = sdkmath.LegacyMustNewDecFromStr("0.95") suite.app.PerpetualKeeper.SetPool(suite.ctx, pool) }, @@ -42,7 +42,7 @@ func (suite *PerpetualKeeperTestSuite) TestCheckLowPoolHealth() { "Pool health is low SHORT", "pool (1) quote asset liabilities ratio (0.950000000000000000) too high for the operation", func() { - pool := types.NewPool(ammPool, sdkmath.LegacyMustNewDecFromStr("10.5")) + pool := types.NewPool(ammPool, sdkmath.LegacyMustNewDecFromStr("10.5"), sdkmath.LegacyMustNewDecFromStr("0.67")) pool.QuoteAssetLiabilitiesRatio = sdkmath.LegacyMustNewDecFromStr("0.95") suite.app.PerpetualKeeper.SetPool(suite.ctx, pool) }, diff --git a/x/perpetual/keeper/pool_test.go b/x/perpetual/keeper/pool_test.go index e8d171c5e..6ae34aa96 100644 --- a/x/perpetual/keeper/pool_test.go +++ b/x/perpetual/keeper/pool_test.go @@ -42,7 +42,7 @@ func createNPool(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Pool { PoolAssets: poolAssets, TotalWeight: math.ZeroInt(), } - items[i] = types.NewPool(ammPool, math.LegacyMustNewDecFromStr("10.5")) + items[i] = types.NewPool(ammPool, math.LegacyMustNewDecFromStr("10.5"), math.LegacyMustNewDecFromStr("0.67")) keeper.SetPool(ctx, items[i]) } diff --git a/x/perpetual/keeper/query_get_positions_for_address_test.go b/x/perpetual/keeper/query_get_positions_for_address_test.go index a3c09a562..0a5390213 100644 --- a/x/perpetual/keeper/query_get_positions_for_address_test.go +++ b/x/perpetual/keeper/query_get_positions_for_address_test.go @@ -3,8 +3,6 @@ package keeper_test import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - "github.com/elys-network/elys/v6/testutil/sample" ptypes "github.com/elys-network/elys/v6/x/parameter/types" "github.com/elys-network/elys/v6/x/perpetual/types" ) @@ -29,20 +27,6 @@ func (suite *PerpetualKeeperTestSuite) TestQueryGetPositionsForAddress_ErrAccAdd suite.Require().ErrorContains(err, "invalid bech32 string length 5") } -func (suite *PerpetualKeeperTestSuite) TestQueryGetPositionsForAddress_ErrPageSize() { - k := suite.app.PerpetualKeeper - ctx := suite.ctx - - _, err := k.GetPositionsForAddress(ctx, &types.PositionsForAddressRequest{ - Address: sample.AccAddress(), - Pagination: &query.PageRequest{ - Limit: 12000, - }, - }) - - suite.Require().ErrorContains(err, "page size greater than max") -} - func (suite *PerpetualKeeperTestSuite) TestQueryGetPositionsForAddress_Successful() { k := suite.app.PerpetualKeeper ctx := suite.ctx @@ -82,9 +66,6 @@ func (suite *PerpetualKeeperTestSuite) TestQueryGetPositionsForAddress_Successfu response, err := k.GetPositionsForAddress(ctx, &types.PositionsForAddressRequest{ Address: firstPositionCreator.String(), - Pagination: &query.PageRequest{ - Limit: 10, - }, }) suite.Require().Nil(err) diff --git a/x/perpetual/migrations/v22_migration.go b/x/perpetual/migrations/v22_migration.go index df67696e4..a5127ac4b 100644 --- a/x/perpetual/migrations/v22_migration.go +++ b/x/perpetual/migrations/v22_migration.go @@ -1,6 +1,7 @@ package migrations import ( + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -11,5 +12,11 @@ func (m Migrator) V22Migration(ctx sdk.Context) error { if err != nil { return err } + + allPools := m.keeper.GetAllPools(ctx) + for _, pool := range allPools { + pool.AdlTriggerRatio = params.PoolMaxLiabilitiesThreshold.Add(math.LegacyMustNewDecFromStr("0.02")) + m.keeper.SetPool(ctx, pool) + } return nil } diff --git a/x/perpetual/module.go b/x/perpetual/module.go index 3f8e2736f..a38b5bfd3 100644 --- a/x/perpetual/module.go +++ b/x/perpetual/module.go @@ -162,7 +162,8 @@ func (am AppModule) BeginBlock(gotCtx context.Context) error { } // EndBlock contains the logic that is automatically triggered at the end of each block -func (am AppModule) EndBlock(_ context.Context) error { +func (am AppModule) EndBlock(gotCtx context.Context) error { + am.keeper.EndBlocker(sdk.UnwrapSDKContext(gotCtx)) return nil } diff --git a/x/perpetual/types/events.go b/x/perpetual/types/events.go index 402b30f98..e96979ace 100644 --- a/x/perpetual/types/events.go +++ b/x/perpetual/types/events.go @@ -10,7 +10,6 @@ const ( EventPaidFromInsuranceFund = "perpetual_mtp_paid_from_insurance_fund" EventInsufficientInsuranceFund = "perpetual_mtp_insufficient_insurance_fund" EventAddCollateral = "perpetual_mtp_add_collateral" - EventADLClose = "perpetual_adl_close" EventClosePositions = "perpetual_close_positions" ) diff --git a/x/perpetual/types/pool.go b/x/perpetual/types/pool.go index bc3e1672d..993b9e2d0 100644 --- a/x/perpetual/types/pool.go +++ b/x/perpetual/types/pool.go @@ -13,7 +13,7 @@ import ( "github.com/osmosis-labs/osmosis/osmomath" ) -func NewPool(ammPool ammtypes.Pool, leverageMax math.LegacyDec) Pool { +func NewPool(ammPool ammtypes.Pool, leverageMax, adlTrigger math.LegacyDec) Pool { p := Pool{ AmmPoolId: ammPool.PoolId, BaseAssetLiabilitiesRatio: math.LegacyZeroDec(), @@ -24,6 +24,7 @@ func NewPool(ammPool ammtypes.Pool, leverageMax math.LegacyDec) Pool { LastHeightBorrowInterestRateComputed: 0, FundingRate: math.LegacyZeroDec(), LeverageMax: leverageMax, + AdlTriggerRatio: adlTrigger, } for _, asset := range ammPool.PoolAssets { diff --git a/x/perpetual/types/pool_test.go b/x/perpetual/types/pool_test.go index 8fe4e513b..62d07bb6b 100644 --- a/x/perpetual/types/pool_test.go +++ b/x/perpetual/types/pool_test.go @@ -30,7 +30,7 @@ func TestPool_UpdateLiabilitiesValid(t *testing.T) { }, }, } - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) pool.PoolAssetsLong = []types.PoolAsset{ { Liabilities: math.NewInt(0), @@ -68,7 +68,7 @@ func TestPool_UpdateLiabilitiesInvalid(t *testing.T) { }, }, } - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) pool.PoolAssetsLong = []types.PoolAsset{ { Liabilities: math.NewInt(0), @@ -102,7 +102,7 @@ func TestPool_UpdateCustodyValid(t *testing.T) { }, }, } - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) pool.PoolAssetsLong = []types.PoolAsset{ { Liabilities: math.NewInt(0), @@ -140,7 +140,7 @@ func TestPool_UpdateCustodyInvalid(t *testing.T) { }, }, } - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) pool.PoolAssetsLong = []types.PoolAsset{ { Liabilities: math.NewInt(0), @@ -175,7 +175,7 @@ func TestPool_InitiatePoolValid(t *testing.T) { }, } // Define the perpetual pool with assets - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) denom := "testAsset" assert.Equal(t, pool.AmmPoolId, (uint64)(1)) @@ -197,7 +197,7 @@ func TestKeeper_GetPerpetualPoolBalances(t *testing.T) { }, }, } - perpetualPool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + perpetualPool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) perpetualPool.PoolAssetsLong = []types.PoolAsset{ { AssetDenom: "testAsset", diff --git a/x/tier/keeper/keeper_test.go b/x/tier/keeper/keeper_test.go index 2ec387996..392c66c95 100644 --- a/x/tier/keeper/keeper_test.go +++ b/x/tier/keeper/keeper_test.go @@ -243,7 +243,7 @@ func (suite *TierKeeperTestSuite) CreateNewAmmPool(creator sdk.AccAddress, useOr _, err = leveragelpmodulekeeper.NewMsgServerImpl(*suite.app.LeveragelpKeeper).AddPool(suite.ctx, &enablePoolMsg) suite.Require().NoError(err) - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) k := suite.app.PerpetualKeeper k.SetPool(suite.ctx, pool) diff --git a/x/tradeshield/keeper/keeper_test.go b/x/tradeshield/keeper/keeper_test.go index 19dbd50a1..ffdd32e42 100644 --- a/x/tradeshield/keeper/keeper_test.go +++ b/x/tradeshield/keeper/keeper_test.go @@ -208,7 +208,7 @@ func (suite *TradeshieldKeeperTestSuite) SetPerpetualPool(poolId uint64) (types. _, err := leveragelpmodulekeeper.NewMsgServerImpl(*suite.app.LeveragelpKeeper).AddPool(ctx, &enablePoolMsg) suite.Require().NoError(err) - pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5")) + pool := types.NewPool(ammPool, math.LegacyMustNewDecFromStr("11.5"), math.LegacyMustNewDecFromStr("0.67")) k.SetPool(ctx, pool) return pool, poolCreator, ammPool From b8b4749fa42808b8fb914aa2011564f9c33aa695 Mon Sep 17 00:00:00 2001 From: avkr003 Date: Wed, 23 Jul 2025 18:41:14 +0530 Subject: [PATCH 4/4] updating adl iterator --- x/perpetual/keeper/adl.go | 7 ++++++- x/perpetual/types/params.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/x/perpetual/keeper/adl.go b/x/perpetual/keeper/adl.go index 25f6b6bf4..e90ec3a41 100644 --- a/x/perpetual/keeper/adl.go +++ b/x/perpetual/keeper/adl.go @@ -90,7 +90,12 @@ func (k Keeper) ClosePositionsOnADL(ctx sdk.Context, perpetualPool types.Pool) e ctx.Logger().Error(errorsmod.Wrap(err, "error fetching paginated positions").Error()) return err } - adlCounter.NextKey = pageResponse.NextKey + + if adlCounter.Counter == 0 { + adlCounter.NextKey = nil + } else { + adlCounter.NextKey = pageResponse.NextKey + } k.SetADLCounter(ctx, adlCounter) for _, mtp := range mtps { diff --git a/x/perpetual/types/params.go b/x/perpetual/types/params.go index 26382ebb6..cbc10bd83 100644 --- a/x/perpetual/types/params.go +++ b/x/perpetual/types/params.go @@ -31,7 +31,7 @@ func NewParams() Params { WeightBreakingFeeFactor: math.LegacyMustNewDecFromStr("0.5"), WhitelistingEnabled: false, EnabledPools: []uint64(nil), - MinimumNotionalValue: math.LegacyNewDec(0), + MinimumNotionalValue: math.LegacyNewDec(10), // Minimum position notional value of 10 units LongMinimumLiabilityAmount: math.NewInt(1), ExitBuffer: math.LegacyMustNewDecFromStr("0.15"), TakerFee: math.LegacyMustNewDecFromStr("0.00075"),