diff --git a/api/elys/accountedpool/accounted_pool.pulsar.go b/api/elys/accountedpool/accounted_pool.pulsar.go index e6ffda23e..d820b2308 100644 --- a/api/elys/accountedpool/accounted_pool.pulsar.go +++ b/api/elys/accountedpool/accounted_pool.pulsar.go @@ -16,136 +16,136 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_AccountedPool_3_list)(nil) +var _ protoreflect.List = (*_LegacyAccountedPool_3_list)(nil) -type _AccountedPool_3_list struct { +type _LegacyAccountedPool_3_list struct { list *[]*amm.PoolAsset } -func (x *_AccountedPool_3_list) Len() int { +func (x *_LegacyAccountedPool_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_AccountedPool_3_list) Get(i int) protoreflect.Value { +func (x *_LegacyAccountedPool_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_AccountedPool_3_list) Set(i int, value protoreflect.Value) { +func (x *_LegacyAccountedPool_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*amm.PoolAsset) (*x.list)[i] = concreteValue } -func (x *_AccountedPool_3_list) Append(value protoreflect.Value) { +func (x *_LegacyAccountedPool_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*amm.PoolAsset) *x.list = append(*x.list, concreteValue) } -func (x *_AccountedPool_3_list) AppendMutable() protoreflect.Value { +func (x *_LegacyAccountedPool_3_list) AppendMutable() protoreflect.Value { v := new(amm.PoolAsset) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_AccountedPool_3_list) Truncate(n int) { +func (x *_LegacyAccountedPool_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_AccountedPool_3_list) NewElement() protoreflect.Value { +func (x *_LegacyAccountedPool_3_list) NewElement() protoreflect.Value { v := new(amm.PoolAsset) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_AccountedPool_3_list) IsValid() bool { +func (x *_LegacyAccountedPool_3_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_AccountedPool_5_list)(nil) +var _ protoreflect.List = (*_LegacyAccountedPool_5_list)(nil) -type _AccountedPool_5_list struct { +type _LegacyAccountedPool_5_list struct { list *[]*v1beta1.Coin } -func (x *_AccountedPool_5_list) Len() int { +func (x *_LegacyAccountedPool_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_AccountedPool_5_list) Get(i int) protoreflect.Value { +func (x *_LegacyAccountedPool_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_AccountedPool_5_list) Set(i int, value protoreflect.Value) { +func (x *_LegacyAccountedPool_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_AccountedPool_5_list) Append(value protoreflect.Value) { +func (x *_LegacyAccountedPool_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_AccountedPool_5_list) AppendMutable() protoreflect.Value { +func (x *_LegacyAccountedPool_5_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_AccountedPool_5_list) Truncate(n int) { +func (x *_LegacyAccountedPool_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_AccountedPool_5_list) NewElement() protoreflect.Value { +func (x *_LegacyAccountedPool_5_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_AccountedPool_5_list) IsValid() bool { +func (x *_LegacyAccountedPool_5_list) IsValid() bool { return x.list != nil } var ( - md_AccountedPool protoreflect.MessageDescriptor - fd_AccountedPool_pool_id protoreflect.FieldDescriptor - fd_AccountedPool_total_shares protoreflect.FieldDescriptor - fd_AccountedPool_pool_assets protoreflect.FieldDescriptor - fd_AccountedPool_total_weight protoreflect.FieldDescriptor - fd_AccountedPool_non_amm_pool_tokens protoreflect.FieldDescriptor + md_LegacyAccountedPool protoreflect.MessageDescriptor + fd_LegacyAccountedPool_pool_id protoreflect.FieldDescriptor + fd_LegacyAccountedPool_total_shares protoreflect.FieldDescriptor + fd_LegacyAccountedPool_pool_assets protoreflect.FieldDescriptor + fd_LegacyAccountedPool_total_weight protoreflect.FieldDescriptor + fd_LegacyAccountedPool_non_amm_pool_tokens protoreflect.FieldDescriptor ) func init() { file_elys_accountedpool_accounted_pool_proto_init() - md_AccountedPool = File_elys_accountedpool_accounted_pool_proto.Messages().ByName("AccountedPool") - fd_AccountedPool_pool_id = md_AccountedPool.Fields().ByName("pool_id") - fd_AccountedPool_total_shares = md_AccountedPool.Fields().ByName("total_shares") - fd_AccountedPool_pool_assets = md_AccountedPool.Fields().ByName("pool_assets") - fd_AccountedPool_total_weight = md_AccountedPool.Fields().ByName("total_weight") - fd_AccountedPool_non_amm_pool_tokens = md_AccountedPool.Fields().ByName("non_amm_pool_tokens") + md_LegacyAccountedPool = File_elys_accountedpool_accounted_pool_proto.Messages().ByName("LegacyAccountedPool") + fd_LegacyAccountedPool_pool_id = md_LegacyAccountedPool.Fields().ByName("pool_id") + fd_LegacyAccountedPool_total_shares = md_LegacyAccountedPool.Fields().ByName("total_shares") + fd_LegacyAccountedPool_pool_assets = md_LegacyAccountedPool.Fields().ByName("pool_assets") + fd_LegacyAccountedPool_total_weight = md_LegacyAccountedPool.Fields().ByName("total_weight") + fd_LegacyAccountedPool_non_amm_pool_tokens = md_LegacyAccountedPool.Fields().ByName("non_amm_pool_tokens") } -var _ protoreflect.Message = (*fastReflection_AccountedPool)(nil) +var _ protoreflect.Message = (*fastReflection_LegacyAccountedPool)(nil) -type fastReflection_AccountedPool AccountedPool +type fastReflection_LegacyAccountedPool LegacyAccountedPool -func (x *AccountedPool) ProtoReflect() protoreflect.Message { - return (*fastReflection_AccountedPool)(x) +func (x *LegacyAccountedPool) ProtoReflect() protoreflect.Message { + return (*fastReflection_LegacyAccountedPool)(x) } -func (x *AccountedPool) slowProtoReflect() protoreflect.Message { +func (x *LegacyAccountedPool) slowProtoReflect() protoreflect.Message { mi := &file_elys_accountedpool_accounted_pool_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -157,43 +157,43 @@ func (x *AccountedPool) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_AccountedPool_messageType fastReflection_AccountedPool_messageType -var _ protoreflect.MessageType = fastReflection_AccountedPool_messageType{} +var _fastReflection_LegacyAccountedPool_messageType fastReflection_LegacyAccountedPool_messageType +var _ protoreflect.MessageType = fastReflection_LegacyAccountedPool_messageType{} -type fastReflection_AccountedPool_messageType struct{} +type fastReflection_LegacyAccountedPool_messageType struct{} -func (x fastReflection_AccountedPool_messageType) Zero() protoreflect.Message { - return (*fastReflection_AccountedPool)(nil) +func (x fastReflection_LegacyAccountedPool_messageType) Zero() protoreflect.Message { + return (*fastReflection_LegacyAccountedPool)(nil) } -func (x fastReflection_AccountedPool_messageType) New() protoreflect.Message { - return new(fastReflection_AccountedPool) +func (x fastReflection_LegacyAccountedPool_messageType) New() protoreflect.Message { + return new(fastReflection_LegacyAccountedPool) } -func (x fastReflection_AccountedPool_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AccountedPool +func (x fastReflection_LegacyAccountedPool_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LegacyAccountedPool } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_AccountedPool) Descriptor() protoreflect.MessageDescriptor { - return md_AccountedPool +func (x *fastReflection_LegacyAccountedPool) Descriptor() protoreflect.MessageDescriptor { + return md_LegacyAccountedPool } // 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_AccountedPool) Type() protoreflect.MessageType { - return _fastReflection_AccountedPool_messageType +func (x *fastReflection_LegacyAccountedPool) Type() protoreflect.MessageType { + return _fastReflection_LegacyAccountedPool_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_AccountedPool) New() protoreflect.Message { - return new(fastReflection_AccountedPool) +func (x *fastReflection_LegacyAccountedPool) New() protoreflect.Message { + return new(fastReflection_LegacyAccountedPool) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_AccountedPool) Interface() protoreflect.ProtoMessage { - return (*AccountedPool)(x) +func (x *fastReflection_LegacyAccountedPool) Interface() protoreflect.ProtoMessage { + return (*LegacyAccountedPool)(x) } // Range iterates over every populated field in an undefined order, @@ -201,34 +201,34 @@ func (x *fastReflection_AccountedPool) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_AccountedPool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_LegacyAccountedPool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.PoolId != uint64(0) { value := protoreflect.ValueOfUint64(x.PoolId) - if !f(fd_AccountedPool_pool_id, value) { + if !f(fd_LegacyAccountedPool_pool_id, value) { return } } if x.TotalShares != nil { value := protoreflect.ValueOfMessage(x.TotalShares.ProtoReflect()) - if !f(fd_AccountedPool_total_shares, value) { + if !f(fd_LegacyAccountedPool_total_shares, value) { return } } if len(x.PoolAssets) != 0 { - value := protoreflect.ValueOfList(&_AccountedPool_3_list{list: &x.PoolAssets}) - if !f(fd_AccountedPool_pool_assets, value) { + value := protoreflect.ValueOfList(&_LegacyAccountedPool_3_list{list: &x.PoolAssets}) + if !f(fd_LegacyAccountedPool_pool_assets, value) { return } } if x.TotalWeight != "" { value := protoreflect.ValueOfString(x.TotalWeight) - if !f(fd_AccountedPool_total_weight, value) { + if !f(fd_LegacyAccountedPool_total_weight, value) { return } } if len(x.NonAmmPoolTokens) != 0 { - value := protoreflect.ValueOfList(&_AccountedPool_5_list{list: &x.NonAmmPoolTokens}) - if !f(fd_AccountedPool_non_amm_pool_tokens, value) { + value := protoreflect.ValueOfList(&_LegacyAccountedPool_5_list{list: &x.NonAmmPoolTokens}) + if !f(fd_LegacyAccountedPool_non_amm_pool_tokens, value) { return } } @@ -245,23 +245,23 @@ func (x *fastReflection_AccountedPool) Range(f func(protoreflect.FieldDescriptor // 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_AccountedPool) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_LegacyAccountedPool) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "elys.accountedpool.AccountedPool.pool_id": + case "elys.accountedpool.LegacyAccountedPool.pool_id": return x.PoolId != uint64(0) - case "elys.accountedpool.AccountedPool.total_shares": + case "elys.accountedpool.LegacyAccountedPool.total_shares": return x.TotalShares != nil - case "elys.accountedpool.AccountedPool.pool_assets": + case "elys.accountedpool.LegacyAccountedPool.pool_assets": return len(x.PoolAssets) != 0 - case "elys.accountedpool.AccountedPool.total_weight": + case "elys.accountedpool.LegacyAccountedPool.total_weight": return x.TotalWeight != "" - case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + case "elys.accountedpool.LegacyAccountedPool.non_amm_pool_tokens": return len(x.NonAmmPoolTokens) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.LegacyAccountedPool")) } - panic(fmt.Errorf("message elys.accountedpool.AccountedPool does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message elys.accountedpool.LegacyAccountedPool does not contain field %s", fd.FullName())) } } @@ -271,23 +271,23 @@ func (x *fastReflection_AccountedPool) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AccountedPool) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_LegacyAccountedPool) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "elys.accountedpool.AccountedPool.pool_id": + case "elys.accountedpool.LegacyAccountedPool.pool_id": x.PoolId = uint64(0) - case "elys.accountedpool.AccountedPool.total_shares": + case "elys.accountedpool.LegacyAccountedPool.total_shares": x.TotalShares = nil - case "elys.accountedpool.AccountedPool.pool_assets": + case "elys.accountedpool.LegacyAccountedPool.pool_assets": x.PoolAssets = nil - case "elys.accountedpool.AccountedPool.total_weight": + case "elys.accountedpool.LegacyAccountedPool.total_weight": x.TotalWeight = "" - case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + case "elys.accountedpool.LegacyAccountedPool.non_amm_pool_tokens": x.NonAmmPoolTokens = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.LegacyAccountedPool")) } - panic(fmt.Errorf("message elys.accountedpool.AccountedPool does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message elys.accountedpool.LegacyAccountedPool does not contain field %s", fd.FullName())) } } @@ -297,34 +297,34 @@ func (x *fastReflection_AccountedPool) Clear(fd protoreflect.FieldDescriptor) { // 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_AccountedPool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LegacyAccountedPool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "elys.accountedpool.AccountedPool.pool_id": + case "elys.accountedpool.LegacyAccountedPool.pool_id": value := x.PoolId return protoreflect.ValueOfUint64(value) - case "elys.accountedpool.AccountedPool.total_shares": + case "elys.accountedpool.LegacyAccountedPool.total_shares": value := x.TotalShares return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "elys.accountedpool.AccountedPool.pool_assets": + case "elys.accountedpool.LegacyAccountedPool.pool_assets": if len(x.PoolAssets) == 0 { - return protoreflect.ValueOfList(&_AccountedPool_3_list{}) + return protoreflect.ValueOfList(&_LegacyAccountedPool_3_list{}) } - listValue := &_AccountedPool_3_list{list: &x.PoolAssets} + listValue := &_LegacyAccountedPool_3_list{list: &x.PoolAssets} return protoreflect.ValueOfList(listValue) - case "elys.accountedpool.AccountedPool.total_weight": + case "elys.accountedpool.LegacyAccountedPool.total_weight": value := x.TotalWeight return protoreflect.ValueOfString(value) - case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + case "elys.accountedpool.LegacyAccountedPool.non_amm_pool_tokens": if len(x.NonAmmPoolTokens) == 0 { - return protoreflect.ValueOfList(&_AccountedPool_5_list{}) + return protoreflect.ValueOfList(&_LegacyAccountedPool_5_list{}) } - listValue := &_AccountedPool_5_list{list: &x.NonAmmPoolTokens} + listValue := &_LegacyAccountedPool_5_list{list: &x.NonAmmPoolTokens} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.LegacyAccountedPool")) } - panic(fmt.Errorf("message elys.accountedpool.AccountedPool does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message elys.accountedpool.LegacyAccountedPool does not contain field %s", descriptor.FullName())) } } @@ -338,27 +338,27 @@ func (x *fastReflection_AccountedPool) Get(descriptor protoreflect.FieldDescript // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AccountedPool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_LegacyAccountedPool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "elys.accountedpool.AccountedPool.pool_id": + case "elys.accountedpool.LegacyAccountedPool.pool_id": x.PoolId = value.Uint() - case "elys.accountedpool.AccountedPool.total_shares": + case "elys.accountedpool.LegacyAccountedPool.total_shares": x.TotalShares = value.Message().Interface().(*v1beta1.Coin) - case "elys.accountedpool.AccountedPool.pool_assets": + case "elys.accountedpool.LegacyAccountedPool.pool_assets": lv := value.List() - clv := lv.(*_AccountedPool_3_list) + clv := lv.(*_LegacyAccountedPool_3_list) x.PoolAssets = *clv.list - case "elys.accountedpool.AccountedPool.total_weight": + case "elys.accountedpool.LegacyAccountedPool.total_weight": x.TotalWeight = value.Interface().(string) - case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + case "elys.accountedpool.LegacyAccountedPool.non_amm_pool_tokens": lv := value.List() - clv := lv.(*_AccountedPool_5_list) + clv := lv.(*_LegacyAccountedPool_5_list) x.NonAmmPoolTokens = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.LegacyAccountedPool")) } - panic(fmt.Errorf("message elys.accountedpool.AccountedPool does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message elys.accountedpool.LegacyAccountedPool does not contain field %s", fd.FullName())) } } @@ -372,70 +372,70 @@ func (x *fastReflection_AccountedPool) Set(fd protoreflect.FieldDescriptor, valu // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AccountedPool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LegacyAccountedPool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "elys.accountedpool.AccountedPool.total_shares": + case "elys.accountedpool.LegacyAccountedPool.total_shares": if x.TotalShares == nil { x.TotalShares = new(v1beta1.Coin) } return protoreflect.ValueOfMessage(x.TotalShares.ProtoReflect()) - case "elys.accountedpool.AccountedPool.pool_assets": + case "elys.accountedpool.LegacyAccountedPool.pool_assets": if x.PoolAssets == nil { x.PoolAssets = []*amm.PoolAsset{} } - value := &_AccountedPool_3_list{list: &x.PoolAssets} + value := &_LegacyAccountedPool_3_list{list: &x.PoolAssets} return protoreflect.ValueOfList(value) - case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + case "elys.accountedpool.LegacyAccountedPool.non_amm_pool_tokens": if x.NonAmmPoolTokens == nil { x.NonAmmPoolTokens = []*v1beta1.Coin{} } - value := &_AccountedPool_5_list{list: &x.NonAmmPoolTokens} + value := &_LegacyAccountedPool_5_list{list: &x.NonAmmPoolTokens} return protoreflect.ValueOfList(value) - case "elys.accountedpool.AccountedPool.pool_id": - panic(fmt.Errorf("field pool_id of message elys.accountedpool.AccountedPool is not mutable")) - case "elys.accountedpool.AccountedPool.total_weight": - panic(fmt.Errorf("field total_weight of message elys.accountedpool.AccountedPool is not mutable")) + case "elys.accountedpool.LegacyAccountedPool.pool_id": + panic(fmt.Errorf("field pool_id of message elys.accountedpool.LegacyAccountedPool is not mutable")) + case "elys.accountedpool.LegacyAccountedPool.total_weight": + panic(fmt.Errorf("field total_weight of message elys.accountedpool.LegacyAccountedPool is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.LegacyAccountedPool")) } - panic(fmt.Errorf("message elys.accountedpool.AccountedPool does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message elys.accountedpool.LegacyAccountedPool 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_AccountedPool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LegacyAccountedPool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "elys.accountedpool.AccountedPool.pool_id": + case "elys.accountedpool.LegacyAccountedPool.pool_id": return protoreflect.ValueOfUint64(uint64(0)) - case "elys.accountedpool.AccountedPool.total_shares": + case "elys.accountedpool.LegacyAccountedPool.total_shares": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "elys.accountedpool.AccountedPool.pool_assets": + case "elys.accountedpool.LegacyAccountedPool.pool_assets": list := []*amm.PoolAsset{} - return protoreflect.ValueOfList(&_AccountedPool_3_list{list: &list}) - case "elys.accountedpool.AccountedPool.total_weight": + return protoreflect.ValueOfList(&_LegacyAccountedPool_3_list{list: &list}) + case "elys.accountedpool.LegacyAccountedPool.total_weight": return protoreflect.ValueOfString("") - case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + case "elys.accountedpool.LegacyAccountedPool.non_amm_pool_tokens": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_AccountedPool_5_list{list: &list}) + return protoreflect.ValueOfList(&_LegacyAccountedPool_5_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.LegacyAccountedPool")) } - panic(fmt.Errorf("message elys.accountedpool.AccountedPool does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message elys.accountedpool.LegacyAccountedPool 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_AccountedPool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_LegacyAccountedPool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in elys.accountedpool.AccountedPool", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in elys.accountedpool.LegacyAccountedPool", d.FullName())) } panic("unreachable") } @@ -443,7 +443,7 @@ func (x *fastReflection_AccountedPool) WhichOneof(d protoreflect.OneofDescriptor // 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_AccountedPool) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_LegacyAccountedPool) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -454,7 +454,7 @@ func (x *fastReflection_AccountedPool) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AccountedPool) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_LegacyAccountedPool) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -466,7 +466,7 @@ func (x *fastReflection_AccountedPool) SetUnknown(fields protoreflect.RawFields) // 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_AccountedPool) IsValid() bool { +func (x *fastReflection_LegacyAccountedPool) IsValid() bool { return x != nil } @@ -476,9 +476,9 @@ func (x *fastReflection_AccountedPool) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_AccountedPool) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_LegacyAccountedPool) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AccountedPool) + x := input.Message.Interface().(*LegacyAccountedPool) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -523,7 +523,7 @@ func (x *fastReflection_AccountedPool) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AccountedPool) + x := input.Message.Interface().(*LegacyAccountedPool) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -611,7 +611,7 @@ func (x *fastReflection_AccountedPool) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AccountedPool) + x := input.Message.Interface().(*LegacyAccountedPool) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -643,10 +643,10 @@ func (x *fastReflection_AccountedPool) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccountedPool: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LegacyAccountedPool: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccountedPool: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LegacyAccountedPool: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -839,172 +839,930 @@ func (x *fastReflection_AccountedPool) ProtoMethods() *protoiface.Methods { } } -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: elys/accountedpool/accounted_pool.proto +var _ protoreflect.List = (*_AccountedPool_2_list)(nil) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +type _AccountedPool_2_list struct { + list *[]*v1beta1.Coin +} -type AccountedPool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *_AccountedPool_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - TotalShares *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"` - PoolAssets []*amm.PoolAsset `protobuf:"bytes,3,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets,omitempty"` - TotalWeight string `protobuf:"bytes,4,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"` - NonAmmPoolTokens []*v1beta1.Coin `protobuf:"bytes,5,rep,name=non_amm_pool_tokens,json=nonAmmPoolTokens,proto3" json:"non_amm_pool_tokens,omitempty"` +func (x *_AccountedPool_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *AccountedPool) Reset() { - *x = AccountedPool{} - if protoimpl.UnsafeEnabled { - mi := &file_elys_accountedpool_accounted_pool_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *_AccountedPool_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_AccountedPool_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_AccountedPool_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AccountedPool_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil } + *x.list = (*x.list)[:n] } -func (x *AccountedPool) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *_AccountedPool_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (*AccountedPool) ProtoMessage() {} +func (x *_AccountedPool_2_list) IsValid() bool { + return x.list != nil +} -// Deprecated: Use AccountedPool.ProtoReflect.Descriptor instead. -func (*AccountedPool) Descriptor() ([]byte, []int) { - return file_elys_accountedpool_accounted_pool_proto_rawDescGZIP(), []int{0} +var _ protoreflect.List = (*_AccountedPool_3_list)(nil) + +type _AccountedPool_3_list struct { + list *[]*v1beta1.Coin } -func (x *AccountedPool) GetPoolId() uint64 { - if x != nil { - return x.PoolId +func (x *_AccountedPool_3_list) Len() int { + if x.list == nil { + return 0 } - return 0 + return len(*x.list) } -func (x *AccountedPool) GetTotalShares() *v1beta1.Coin { - if x != nil { - return x.TotalShares - } - return nil +func (x *_AccountedPool_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *AccountedPool) GetPoolAssets() []*amm.PoolAsset { - if x != nil { - return x.PoolAssets - } - return nil +func (x *_AccountedPool_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue } -func (x *AccountedPool) GetTotalWeight() string { - if x != nil { - return x.TotalWeight - } - return "" +func (x *_AccountedPool_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) } -func (x *AccountedPool) GetNonAmmPoolTokens() []*v1beta1.Coin { - if x != nil { - return x.NonAmmPoolTokens +func (x *_AccountedPool_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AccountedPool_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil } - return nil + *x.list = (*x.list)[:n] } -var File_elys_accountedpool_accounted_pool_proto protoreflect.FileDescriptor +func (x *_AccountedPool_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} -var file_elys_accountedpool_accounted_pool_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, - 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x5f, 0x70, - 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, 0x6c, 0x79, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0x1a, 0x19, 0x65, - 0x6c, 0x79, 0x73, 0x2f, 0x61, 0x6d, 0x6d, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x02, 0x0a, 0x0d, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 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, 0x42, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x68, - 0x61, 0x72, 0x65, 0x73, 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, 0x0b, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0b, 0x70, 0x6f, 0x6f, 0x6c, - 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x61, 0x6d, 0x6d, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x70, 0x6f, 0x6f, 0x6c, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 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, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x4e, 0x0a, 0x13, 0x6e, 0x6f, 0x6e, 0x5f, 0x61, 0x6d, 0x6d, 0x5f, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x05, 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, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x41, 0x6d, 0x6d, 0x50, 0x6f, 0x6f, 0x6c, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x42, 0xca, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x6c, 0x79, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0x42, - 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 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, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0xa2, 0x02, 0x03, 0x45, 0x41, 0x58, - 0xaa, 0x02, 0x12, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, - 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0xca, 0x02, 0x12, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0xe2, 0x02, 0x1e, 0x45, 0x6c, 0x79, - 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x45, 0x6c, - 0x79, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, - 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *_AccountedPool_3_list) IsValid() bool { + return x.list != nil } var ( - file_elys_accountedpool_accounted_pool_proto_rawDescOnce sync.Once - file_elys_accountedpool_accounted_pool_proto_rawDescData = file_elys_accountedpool_accounted_pool_proto_rawDesc + md_AccountedPool protoreflect.MessageDescriptor + fd_AccountedPool_pool_id protoreflect.FieldDescriptor + fd_AccountedPool_total_tokens protoreflect.FieldDescriptor + fd_AccountedPool_non_amm_pool_tokens protoreflect.FieldDescriptor ) -func file_elys_accountedpool_accounted_pool_proto_rawDescGZIP() []byte { - file_elys_accountedpool_accounted_pool_proto_rawDescOnce.Do(func() { - file_elys_accountedpool_accounted_pool_proto_rawDescData = protoimpl.X.CompressGZIP(file_elys_accountedpool_accounted_pool_proto_rawDescData) - }) - return file_elys_accountedpool_accounted_pool_proto_rawDescData +func init() { + file_elys_accountedpool_accounted_pool_proto_init() + md_AccountedPool = File_elys_accountedpool_accounted_pool_proto.Messages().ByName("AccountedPool") + fd_AccountedPool_pool_id = md_AccountedPool.Fields().ByName("pool_id") + fd_AccountedPool_total_tokens = md_AccountedPool.Fields().ByName("total_tokens") + fd_AccountedPool_non_amm_pool_tokens = md_AccountedPool.Fields().ByName("non_amm_pool_tokens") } -var file_elys_accountedpool_accounted_pool_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_elys_accountedpool_accounted_pool_proto_goTypes = []interface{}{ - (*AccountedPool)(nil), // 0: elys.accountedpool.AccountedPool - (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin - (*amm.PoolAsset)(nil), // 2: elys.amm.PoolAsset -} -var file_elys_accountedpool_accounted_pool_proto_depIdxs = []int32{ - 1, // 0: elys.accountedpool.AccountedPool.total_shares:type_name -> cosmos.base.v1beta1.Coin - 2, // 1: elys.accountedpool.AccountedPool.pool_assets:type_name -> elys.amm.PoolAsset - 1, // 2: elys.accountedpool.AccountedPool.non_amm_pool_tokens:type_name -> cosmos.base.v1beta1.Coin - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name +var _ protoreflect.Message = (*fastReflection_AccountedPool)(nil) + +type fastReflection_AccountedPool AccountedPool + +func (x *AccountedPool) ProtoReflect() protoreflect.Message { + return (*fastReflection_AccountedPool)(x) } -func init() { file_elys_accountedpool_accounted_pool_proto_init() } -func file_elys_accountedpool_accounted_pool_proto_init() { - if File_elys_accountedpool_accounted_pool_proto != nil { - return +func (x *AccountedPool) slowProtoReflect() protoreflect.Message { + mi := &file_elys_accountedpool_accounted_pool_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - if !protoimpl.UnsafeEnabled { - file_elys_accountedpool_accounted_pool_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + return mi.MessageOf(x) +} + +var _fastReflection_AccountedPool_messageType fastReflection_AccountedPool_messageType +var _ protoreflect.MessageType = fastReflection_AccountedPool_messageType{} + +type fastReflection_AccountedPool_messageType struct{} + +func (x fastReflection_AccountedPool_messageType) Zero() protoreflect.Message { + return (*fastReflection_AccountedPool)(nil) +} +func (x fastReflection_AccountedPool_messageType) New() protoreflect.Message { + return new(fastReflection_AccountedPool) +} +func (x fastReflection_AccountedPool_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AccountedPool +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AccountedPool) Descriptor() protoreflect.MessageDescriptor { + return md_AccountedPool +} + +// 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_AccountedPool) Type() protoreflect.MessageType { + return _fastReflection_AccountedPool_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AccountedPool) New() protoreflect.Message { + return new(fastReflection_AccountedPool) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AccountedPool) Interface() protoreflect.ProtoMessage { + return (*AccountedPool)(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_AccountedPool) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.PoolId != uint64(0) { + value := protoreflect.ValueOfUint64(x.PoolId) + if !f(fd_AccountedPool_pool_id, value) { + return + } + } + if len(x.TotalTokens) != 0 { + value := protoreflect.ValueOfList(&_AccountedPool_2_list{list: &x.TotalTokens}) + if !f(fd_AccountedPool_total_tokens, value) { + return + } + } + if len(x.NonAmmPoolTokens) != 0 { + value := protoreflect.ValueOfList(&_AccountedPool_3_list{list: &x.NonAmmPoolTokens}) + if !f(fd_AccountedPool_non_amm_pool_tokens, 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_AccountedPool) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "elys.accountedpool.AccountedPool.pool_id": + return x.PoolId != uint64(0) + case "elys.accountedpool.AccountedPool.total_tokens": + return len(x.TotalTokens) != 0 + case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + return len(x.NonAmmPoolTokens) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + } + panic(fmt.Errorf("message elys.accountedpool.AccountedPool 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_AccountedPool) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "elys.accountedpool.AccountedPool.pool_id": + x.PoolId = uint64(0) + case "elys.accountedpool.AccountedPool.total_tokens": + x.TotalTokens = nil + case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + x.NonAmmPoolTokens = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + } + panic(fmt.Errorf("message elys.accountedpool.AccountedPool 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_AccountedPool) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "elys.accountedpool.AccountedPool.pool_id": + value := x.PoolId + return protoreflect.ValueOfUint64(value) + case "elys.accountedpool.AccountedPool.total_tokens": + if len(x.TotalTokens) == 0 { + return protoreflect.ValueOfList(&_AccountedPool_2_list{}) + } + listValue := &_AccountedPool_2_list{list: &x.TotalTokens} + return protoreflect.ValueOfList(listValue) + case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + if len(x.NonAmmPoolTokens) == 0 { + return protoreflect.ValueOfList(&_AccountedPool_3_list{}) + } + listValue := &_AccountedPool_3_list{list: &x.NonAmmPoolTokens} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + } + panic(fmt.Errorf("message elys.accountedpool.AccountedPool 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_AccountedPool) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "elys.accountedpool.AccountedPool.pool_id": + x.PoolId = value.Uint() + case "elys.accountedpool.AccountedPool.total_tokens": + lv := value.List() + clv := lv.(*_AccountedPool_2_list) + x.TotalTokens = *clv.list + case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + lv := value.List() + clv := lv.(*_AccountedPool_3_list) + x.NonAmmPoolTokens = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + } + panic(fmt.Errorf("message elys.accountedpool.AccountedPool 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_AccountedPool) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "elys.accountedpool.AccountedPool.total_tokens": + if x.TotalTokens == nil { + x.TotalTokens = []*v1beta1.Coin{} + } + value := &_AccountedPool_2_list{list: &x.TotalTokens} + return protoreflect.ValueOfList(value) + case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + if x.NonAmmPoolTokens == nil { + x.NonAmmPoolTokens = []*v1beta1.Coin{} + } + value := &_AccountedPool_3_list{list: &x.NonAmmPoolTokens} + return protoreflect.ValueOfList(value) + case "elys.accountedpool.AccountedPool.pool_id": + panic(fmt.Errorf("field pool_id of message elys.accountedpool.AccountedPool is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + } + panic(fmt.Errorf("message elys.accountedpool.AccountedPool 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_AccountedPool) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "elys.accountedpool.AccountedPool.pool_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "elys.accountedpool.AccountedPool.total_tokens": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_AccountedPool_2_list{list: &list}) + case "elys.accountedpool.AccountedPool.non_amm_pool_tokens": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_AccountedPool_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: elys.accountedpool.AccountedPool")) + } + panic(fmt.Errorf("message elys.accountedpool.AccountedPool 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_AccountedPool) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in elys.accountedpool.AccountedPool", 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_AccountedPool) 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_AccountedPool) 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_AccountedPool) 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_AccountedPool) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AccountedPool) + 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 len(x.TotalTokens) > 0 { + for _, e := range x.TotalTokens { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.NonAmmPoolTokens) > 0 { + for _, e := range x.NonAmmPoolTokens { + l = options.Size(e) + 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().(*AccountedPool) + 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.NonAmmPoolTokens) > 0 { + for iNdEx := len(x.NonAmmPoolTokens) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.NonAmmPoolTokens[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] = 0x1a + } + } + if len(x.TotalTokens) > 0 { + for iNdEx := len(x.TotalTokens) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TotalTokens[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + 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().(*AccountedPool) + 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: AccountedPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AccountedPool: 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 != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalTokens", 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.TotalTokens = append(x.TotalTokens, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalTokens[len(x.TotalTokens)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NonAmmPoolTokens", 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.NonAmmPoolTokens = append(x.NonAmmPoolTokens, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NonAmmPoolTokens[len(x.NonAmmPoolTokens)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: elys/accountedpool/accounted_pool.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LegacyAccountedPool 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"` + TotalShares *v1beta1.Coin `protobuf:"bytes,2,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"` + PoolAssets []*amm.PoolAsset `protobuf:"bytes,3,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets,omitempty"` + TotalWeight string `protobuf:"bytes,4,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"` + NonAmmPoolTokens []*v1beta1.Coin `protobuf:"bytes,5,rep,name=non_amm_pool_tokens,json=nonAmmPoolTokens,proto3" json:"non_amm_pool_tokens,omitempty"` +} + +func (x *LegacyAccountedPool) Reset() { + *x = LegacyAccountedPool{} + if protoimpl.UnsafeEnabled { + mi := &file_elys_accountedpool_accounted_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LegacyAccountedPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LegacyAccountedPool) ProtoMessage() {} + +// Deprecated: Use LegacyAccountedPool.ProtoReflect.Descriptor instead. +func (*LegacyAccountedPool) Descriptor() ([]byte, []int) { + return file_elys_accountedpool_accounted_pool_proto_rawDescGZIP(), []int{0} +} + +func (x *LegacyAccountedPool) GetPoolId() uint64 { + if x != nil { + return x.PoolId + } + return 0 +} + +func (x *LegacyAccountedPool) GetTotalShares() *v1beta1.Coin { + if x != nil { + return x.TotalShares + } + return nil +} + +func (x *LegacyAccountedPool) GetPoolAssets() []*amm.PoolAsset { + if x != nil { + return x.PoolAssets + } + return nil +} + +func (x *LegacyAccountedPool) GetTotalWeight() string { + if x != nil { + return x.TotalWeight + } + return "" +} + +func (x *LegacyAccountedPool) GetNonAmmPoolTokens() []*v1beta1.Coin { + if x != nil { + return x.NonAmmPoolTokens + } + return nil +} + +type AccountedPool 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"` + TotalTokens []*v1beta1.Coin `protobuf:"bytes,2,rep,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"` + NonAmmPoolTokens []*v1beta1.Coin `protobuf:"bytes,3,rep,name=non_amm_pool_tokens,json=nonAmmPoolTokens,proto3" json:"non_amm_pool_tokens,omitempty"` +} + +func (x *AccountedPool) Reset() { + *x = AccountedPool{} + if protoimpl.UnsafeEnabled { + mi := &file_elys_accountedpool_accounted_pool_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountedPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountedPool) ProtoMessage() {} + +// Deprecated: Use AccountedPool.ProtoReflect.Descriptor instead. +func (*AccountedPool) Descriptor() ([]byte, []int) { + return file_elys_accountedpool_accounted_pool_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountedPool) GetPoolId() uint64 { + if x != nil { + return x.PoolId + } + return 0 +} + +func (x *AccountedPool) GetTotalTokens() []*v1beta1.Coin { + if x != nil { + return x.TotalTokens + } + return nil +} + +func (x *AccountedPool) GetNonAmmPoolTokens() []*v1beta1.Coin { + if x != nil { + return x.NonAmmPoolTokens + } + return nil +} + +var File_elys_accountedpool_accounted_pool_proto protoreflect.FileDescriptor + +var file_elys_accountedpool_accounted_pool_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x65, 0x6c, 0x79, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, + 0x70, 0x6f, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, 0x6c, 0x79, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0x1a, 0x19, 0x65, + 0x6c, 0x79, 0x73, 0x2f, 0x61, 0x6d, 0x6d, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0xce, 0x02, 0x0a, 0x13, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6f, + 0x6c, 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, 0x42, 0x0a, 0x0c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 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, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x3a, + 0x0a, 0x0b, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x61, 0x6d, 0x6d, 0x2e, 0x50, + 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, + 0x70, 0x6f, 0x6f, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 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, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4e, 0x0a, 0x13, 0x6e, 0x6f, + 0x6e, 0x5f, 0x61, 0x6d, 0x6d, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x73, 0x18, 0x05, 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, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x41, 0x6d, 0x6d, + 0x50, 0x6f, 0x6f, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x0d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 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, 0x42, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x13, 0x6e, 0x6f, 0x6e, + 0x5f, 0x61, 0x6d, 0x6d, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x18, 0x03, 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, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x6e, 0x6f, 0x6e, 0x41, 0x6d, 0x6d, 0x50, + 0x6f, 0x6f, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0xca, 0x01, 0x0a, 0x16, 0x63, 0x6f, + 0x6d, 0x2e, 0x65, 0x6c, 0x79, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, + 0x70, 0x6f, 0x6f, 0x6c, 0x42, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x50, + 0x6f, 0x6f, 0x6c, 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, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6c, 0x79, + 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0xa2, + 0x02, 0x03, 0x45, 0x41, 0x58, 0xaa, 0x02, 0x12, 0x45, 0x6c, 0x79, 0x73, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0xca, 0x02, 0x12, 0x45, 0x6c, 0x79, + 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0xe2, + 0x02, 0x1e, 0x45, 0x6c, 0x79, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, + 0x70, 0x6f, 0x6f, 0x6c, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x13, 0x45, 0x6c, 0x79, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x64, 0x70, 0x6f, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_elys_accountedpool_accounted_pool_proto_rawDescOnce sync.Once + file_elys_accountedpool_accounted_pool_proto_rawDescData = file_elys_accountedpool_accounted_pool_proto_rawDesc +) + +func file_elys_accountedpool_accounted_pool_proto_rawDescGZIP() []byte { + file_elys_accountedpool_accounted_pool_proto_rawDescOnce.Do(func() { + file_elys_accountedpool_accounted_pool_proto_rawDescData = protoimpl.X.CompressGZIP(file_elys_accountedpool_accounted_pool_proto_rawDescData) + }) + return file_elys_accountedpool_accounted_pool_proto_rawDescData +} + +var file_elys_accountedpool_accounted_pool_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_elys_accountedpool_accounted_pool_proto_goTypes = []interface{}{ + (*LegacyAccountedPool)(nil), // 0: elys.accountedpool.LegacyAccountedPool + (*AccountedPool)(nil), // 1: elys.accountedpool.AccountedPool + (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin + (*amm.PoolAsset)(nil), // 3: elys.amm.PoolAsset +} +var file_elys_accountedpool_accounted_pool_proto_depIdxs = []int32{ + 2, // 0: elys.accountedpool.LegacyAccountedPool.total_shares:type_name -> cosmos.base.v1beta1.Coin + 3, // 1: elys.accountedpool.LegacyAccountedPool.pool_assets:type_name -> elys.amm.PoolAsset + 2, // 2: elys.accountedpool.LegacyAccountedPool.non_amm_pool_tokens:type_name -> cosmos.base.v1beta1.Coin + 2, // 3: elys.accountedpool.AccountedPool.total_tokens:type_name -> cosmos.base.v1beta1.Coin + 2, // 4: elys.accountedpool.AccountedPool.non_amm_pool_tokens:type_name -> cosmos.base.v1beta1.Coin + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 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_accountedpool_accounted_pool_proto_init() } +func file_elys_accountedpool_accounted_pool_proto_init() { + if File_elys_accountedpool_accounted_pool_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_elys_accountedpool_accounted_pool_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LegacyAccountedPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_elys_accountedpool_accounted_pool_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccountedPool); i { case 0: return &v.state @@ -1023,7 +1781,7 @@ func file_elys_accountedpool_accounted_pool_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_elys_accountedpool_accounted_pool_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/elys/accountedpool/accounted_pool.proto b/proto/elys/accountedpool/accounted_pool.proto index a51a7df35..e214ccf3c 100644 --- a/proto/elys/accountedpool/accounted_pool.proto +++ b/proto/elys/accountedpool/accounted_pool.proto @@ -7,7 +7,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; -message AccountedPool { +message LegacyAccountedPool { uint64 pool_id = 1; cosmos.base.v1beta1.Coin total_shares = 2 [ (gogoproto.nullable) = false ]; repeated elys.amm.PoolAsset pool_assets = 3 [ (gogoproto.nullable) = false ]; @@ -19,3 +19,11 @@ message AccountedPool { repeated cosmos.base.v1beta1.Coin non_amm_pool_tokens = 5 [ (gogoproto.nullable) = false ]; } + +message AccountedPool { + uint64 pool_id = 1; + repeated cosmos.base.v1beta1.Coin total_tokens = 2 + [ (gogoproto.nullable) = false ]; + repeated cosmos.base.v1beta1.Coin non_amm_pool_tokens = 3 + [ (gogoproto.nullable) = false ]; +} diff --git a/x/accountedpool/client/cli/query_accounted_pool_test.go b/x/accountedpool/client/cli/query_accounted_pool_test.go index 9835333ee..ac340c2f5 100644 --- a/x/accountedpool/client/cli/query_accounted_pool_test.go +++ b/x/accountedpool/client/cli/query_accounted_pool_test.go @@ -108,8 +108,6 @@ func TestShowAccountedPool(t *testing.T) { var resp types.QueryGetAccountedPoolResponse require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) require.NotNil(t, resp.AccountedPool) - // total weight is not set in genesis state - tc.obj.TotalWeight = resp.AccountedPool.TotalWeight require.Equal(t, nullify.Fill(&tc.obj), nullify.Fill(&resp.AccountedPool), @@ -167,10 +165,6 @@ func TestListAccountedPool(t *testing.T) { require.NoError(t, err) require.LessOrEqual(t, len(resp.AccountedPool), stepSize) - for j, accountedPool := range resp.AccountedPool { - objs[i+j].TotalWeight = accountedPool.TotalWeight - } - require.Subset(t, nullify.Fill(objs), nullify.Fill(resp.AccountedPool)) } }) @@ -182,10 +176,6 @@ func TestListAccountedPool(t *testing.T) { require.NoError(t, err) require.LessOrEqual(t, len(resp.AccountedPool), stepSize) - for j, accountedPool := range resp.AccountedPool { - objs[i+j].TotalWeight = accountedPool.TotalWeight - } - require.Subset(t, nullify.Fill(objs), nullify.Fill(resp.AccountedPool)) next = resp.Pagination.NextKey } @@ -196,10 +186,6 @@ func TestListAccountedPool(t *testing.T) { require.NoError(t, err) require.Equal(t, len(objs), int(resp.Pagination.Total)) - for i, accountedPool := range resp.AccountedPool { - objs[i].TotalWeight = accountedPool.TotalWeight - } - require.ElementsMatch(t, nullify.Fill(objs), nullify.Fill(resp.AccountedPool)) }) } diff --git a/x/accountedpool/keeper/accounted_pool.go b/x/accountedpool/keeper/accounted_pool.go index 57d916829..e6b29d6ba 100644 --- a/x/accountedpool/keeper/accounted_pool.go +++ b/x/accountedpool/keeper/accounted_pool.go @@ -50,6 +50,22 @@ func (k Keeper) GetAllAccountedPool(ctx sdk.Context) (list []types.AccountedPool return } +// GetAllAccountedPool returns all accountedPool +func (k Keeper) GetAllLegacyAccountedPool(ctx sdk.Context) (list []types.LegacyAccountedPool) { + store := prefix.NewStore(runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)), types.KeyPrefix(types.AccountedPoolKeyPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.LegacyAccountedPool + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} + // PoolExists checks if a pool with the given poolId exists in the list of pools func (k Keeper) PoolExists(ctx sdk.Context, poolId uint64) bool { store := prefix.NewStore(runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)), types.KeyPrefix(types.AccountedPoolKeyPrefix)) diff --git a/x/accountedpool/keeper/accounted_pool_test.go b/x/accountedpool/keeper/accounted_pool_test.go index f137e5c95..182d6f51c 100644 --- a/x/accountedpool/keeper/accounted_pool_test.go +++ b/x/accountedpool/keeper/accounted_pool_test.go @@ -3,13 +3,11 @@ package keeper_test import ( "testing" - sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" keepertest "github.com/elys-network/elys/testutil/keeper" "github.com/elys-network/elys/testutil/nullify" "github.com/elys-network/elys/x/accountedpool/keeper" "github.com/elys-network/elys/x/accountedpool/types" - ammtypes "github.com/elys-network/elys/x/amm/types" "github.com/stretchr/testify/require" ) @@ -17,9 +15,6 @@ func createNAccountedPool(keeper *keeper.Keeper, ctx sdk.Context, n int) []types items := make([]types.AccountedPool, n) for i := range items { items[i].PoolId = (uint64)(i) - items[i].TotalShares = sdk.NewCoin("lpshare", sdkmath.ZeroInt()) - items[i].PoolAssets = []ammtypes.PoolAsset{} - items[i].TotalWeight = sdkmath.ZeroInt() keeper.SetAccountedPool(ctx, items[i]) } diff --git a/x/accountedpool/keeper/accounted_pool_update_test.go b/x/accountedpool/keeper/accounted_pool_update_test.go index 81a526561..d45f5f89d 100644 --- a/x/accountedpool/keeper/accounted_pool_update_test.go +++ b/x/accountedpool/keeper/accounted_pool_update_test.go @@ -43,13 +43,13 @@ func TestAccountedPoolUpdate(t *testing.T) { // Initiate pool accountedPool := types.AccountedPool{ PoolId: 0, - TotalShares: ammPool.TotalShares, - PoolAssets: []ammtypes.PoolAsset{}, - TotalWeight: ammPool.TotalWeight, + TotalTokens: []sdk.Coin{}, NonAmmPoolTokens: []sdk.Coin{}, } - accountedPool.PoolAssets = append(accountedPool.PoolAssets, ammPool.PoolAssets...) + for _, asset := range ammPool.PoolAssets { + accountedPool.TotalTokens = append(accountedPool.TotalTokens, asset.Token) + } // Set accounted pool apk.SetAccountedPool(ctx, accountedPool) diff --git a/x/accountedpool/keeper/hooks_amm.go b/x/accountedpool/keeper/hooks_amm.go index af31d6271..89713e5e0 100644 --- a/x/accountedpool/keeper/hooks_amm.go +++ b/x/accountedpool/keeper/hooks_amm.go @@ -25,15 +25,12 @@ func (k Keeper) UpdateAccountedPoolOnAmmChange(ctx sdk.Context, ammPool ammtypes } } - for j, accountedPoolAsset := range accountedPool.PoolAssets { + for j, accountedPoolAsset := range accountedPool.TotalTokens { - if ammPoolAsset.Token.Denom == accountedPoolAsset.Token.Denom { + if ammPoolAsset.Token.Denom == accountedPoolAsset.Denom { updatedAccountedPoolAsset := ammPoolAsset updatedAccountedPoolAsset.Token.Amount = updatedAccountedPoolAsset.Token.Amount.Add(nonAmmTokenBalance) - // TODO what to do with the weight - //updatedAccountedPoolAsset.Weight = - - accountedPool.PoolAssets[j] = updatedAccountedPoolAsset + accountedPool.TotalTokens[j] = updatedAccountedPoolAsset.Token break } diff --git a/x/accountedpool/keeper/hooks_leveragelp.go b/x/accountedpool/keeper/hooks_leveragelp.go index 01b203bae..f6e428c7f 100644 --- a/x/accountedpool/keeper/hooks_leveragelp.go +++ b/x/accountedpool/keeper/hooks_leveragelp.go @@ -20,16 +20,14 @@ func (k Keeper) OnLeverageLpPoolEnable(ctx sdk.Context, ammPool ammtypes.Pool) e // Initiate pool accountedPool := types.AccountedPool{ PoolId: poolId, - TotalShares: ammPool.TotalShares, - PoolAssets: []ammtypes.PoolAsset{}, - TotalWeight: ammPool.TotalWeight, + TotalTokens: sdk.NewCoins(), NonAmmPoolTokens: sdk.NewCoins(), } nonAmmPoolTokens := make([]sdk.Coin, len(ammPool.PoolAssets)) for i, poolAsset := range ammPool.PoolAssets { - accountedPool.PoolAssets = append(accountedPool.PoolAssets, poolAsset) + accountedPool.TotalTokens = append(accountedPool.TotalTokens, poolAsset.Token) nonAmmPoolTokens[i] = sdk.NewCoin(poolAsset.Token.Denom, math.ZeroInt()) } accountedPool.NonAmmPoolTokens = nonAmmPoolTokens diff --git a/x/accountedpool/keeper/hooks_perpetual.go b/x/accountedpool/keeper/hooks_perpetual.go index df03ac929..a7db6dcf3 100644 --- a/x/accountedpool/keeper/hooks_perpetual.go +++ b/x/accountedpool/keeper/hooks_perpetual.go @@ -16,21 +16,21 @@ func (k Keeper) PerpetualUpdates(ctx sdk.Context, ammPool ammtypes.Pool, perpetu // Accounted pool balance = amm pool + (long liability - long profit taking liability) - (long custody - long profit taking custody) + (short liability - short profit taking liability ) - ( short custody - short profit taking custody) // Accounted pool balance = amm pool + totalLiabilities - totalCustody + total profit taking custody - total profit taking liability - for i, asset := range accountedPool.PoolAssets { - ammBalance, err := ammPool.GetAmmPoolBalance(asset.Token.Denom) + for i, asset := range accountedPool.TotalTokens { + ammBalance, err := ammPool.GetAmmPoolBalance(asset.Denom) if err != nil { return err } - totalLiabilities, totalCustody, totalTakeProfitCustody, totalTakeProfitLiabilities := perpetualPool.GetPerpetualPoolBalances(asset.Token.Denom) + totalLiabilities, totalCustody, totalTakeProfitCustody, totalTakeProfitLiabilities := perpetualPool.GetPerpetualPoolBalances(asset.Denom) accountedPoolAmt := ammBalance.Add(totalLiabilities).Sub(totalCustody) // if this is enabled then we need to consider impact of weight balance bonus of swap while calculating takeProfitLiabilities if EnableTakeProfitCustodyLiabilities { accountedPoolAmt = accountedPoolAmt.Add(totalTakeProfitCustody).Sub(totalTakeProfitLiabilities) } - accountedPool.PoolAssets[i].Token = sdk.NewCoin(asset.Token.Denom, accountedPoolAmt) + accountedPool.TotalTokens[i] = sdk.NewCoin(asset.Denom, accountedPoolAmt) for j, nonAmmToken := range accountedPool.NonAmmPoolTokens { - if nonAmmToken.Denom == asset.Token.Denom { + if nonAmmToken.Denom == asset.Denom { accountedPool.NonAmmPoolTokens[j].Amount = accountedPoolAmt.Sub(ammBalance) break } diff --git a/x/accountedpool/keeper/keeper.go b/x/accountedpool/keeper/keeper.go index b92ee8365..d0e5bf565 100644 --- a/x/accountedpool/keeper/keeper.go +++ b/x/accountedpool/keeper/keeper.go @@ -42,9 +42,9 @@ func (k Keeper) GetAccountedBalance(ctx sdk.Context, poolId uint64, denom string return sdkmath.ZeroInt() } - for _, asset := range pool.PoolAssets { - if asset.Token.Denom == denom { - return asset.Token.Amount + for _, token := range pool.TotalTokens { + if token.Denom == denom { + return token.Amount } } diff --git a/x/accountedpool/migrations/v3_migration.go b/x/accountedpool/migrations/v3_migration.go new file mode 100644 index 000000000..e3a81170e --- /dev/null +++ b/x/accountedpool/migrations/v3_migration.go @@ -0,0 +1,26 @@ +package migrations + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/elys-network/elys/x/accountedpool/types" +) + +func (m Migrator) V3Migration(ctx sdk.Context) error { + allLegacyAccountedPool := m.keeper.GetAllLegacyAccountedPool(ctx) + + for _, legacyAccountedPool := range allLegacyAccountedPool { + accountedPool := types.AccountedPool{ + PoolId: legacyAccountedPool.PoolId, + TotalTokens: []sdk.Coin{}, + NonAmmPoolTokens: legacyAccountedPool.NonAmmPoolTokens, + } + + for _, asset := range legacyAccountedPool.PoolAssets { + accountedPool.TotalTokens = append(accountedPool.TotalTokens, asset.Token) + } + + m.keeper.SetAccountedPool(ctx, accountedPool) + + } + return nil +} diff --git a/x/accountedpool/module.go b/x/accountedpool/module.go index 8413fc21d..074ab4bc9 100644 --- a/x/accountedpool/module.go +++ b/x/accountedpool/module.go @@ -128,7 +128,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, 1, m.V2Migration) + err := cfg.RegisterMigration(types.ModuleName, 2, m.V3Migration) if err != nil { panic(err) } @@ -155,7 +155,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 2 } +func (AppModule) ConsensusVersion() uint64 { return 3 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(_ context.Context) error { diff --git a/x/accountedpool/types/accounted_pool.pb.go b/x/accountedpool/types/accounted_pool.pb.go index 7151eba35..bee497f3b 100644 --- a/x/accountedpool/types/accounted_pool.pb.go +++ b/x/accountedpool/types/accounted_pool.pb.go @@ -27,7 +27,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type AccountedPool struct { +type LegacyAccountedPool struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` TotalShares types.Coin `protobuf:"bytes,2,opt,name=total_shares,json=totalShares,proto3" json:"total_shares"` PoolAssets []types1.PoolAsset `protobuf:"bytes,3,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets"` @@ -35,11 +35,78 @@ type AccountedPool struct { NonAmmPoolTokens []types.Coin `protobuf:"bytes,5,rep,name=non_amm_pool_tokens,json=nonAmmPoolTokens,proto3" json:"non_amm_pool_tokens"` } +func (m *LegacyAccountedPool) Reset() { *m = LegacyAccountedPool{} } +func (m *LegacyAccountedPool) String() string { return proto.CompactTextString(m) } +func (*LegacyAccountedPool) ProtoMessage() {} +func (*LegacyAccountedPool) Descriptor() ([]byte, []int) { + return fileDescriptor_237592a8964da530, []int{0} +} +func (m *LegacyAccountedPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LegacyAccountedPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LegacyAccountedPool.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 *LegacyAccountedPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_LegacyAccountedPool.Merge(m, src) +} +func (m *LegacyAccountedPool) XXX_Size() int { + return m.Size() +} +func (m *LegacyAccountedPool) XXX_DiscardUnknown() { + xxx_messageInfo_LegacyAccountedPool.DiscardUnknown(m) +} + +var xxx_messageInfo_LegacyAccountedPool proto.InternalMessageInfo + +func (m *LegacyAccountedPool) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *LegacyAccountedPool) GetTotalShares() types.Coin { + if m != nil { + return m.TotalShares + } + return types.Coin{} +} + +func (m *LegacyAccountedPool) GetPoolAssets() []types1.PoolAsset { + if m != nil { + return m.PoolAssets + } + return nil +} + +func (m *LegacyAccountedPool) GetNonAmmPoolTokens() []types.Coin { + if m != nil { + return m.NonAmmPoolTokens + } + return nil +} + +type AccountedPool struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + TotalTokens []types.Coin `protobuf:"bytes,2,rep,name=total_tokens,json=totalTokens,proto3" json:"total_tokens"` + NonAmmPoolTokens []types.Coin `protobuf:"bytes,3,rep,name=non_amm_pool_tokens,json=nonAmmPoolTokens,proto3" json:"non_amm_pool_tokens"` +} + func (m *AccountedPool) Reset() { *m = AccountedPool{} } func (m *AccountedPool) String() string { return proto.CompactTextString(m) } func (*AccountedPool) ProtoMessage() {} func (*AccountedPool) Descriptor() ([]byte, []int) { - return fileDescriptor_237592a8964da530, []int{0} + return fileDescriptor_237592a8964da530, []int{1} } func (m *AccountedPool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,16 +142,9 @@ func (m *AccountedPool) GetPoolId() uint64 { return 0 } -func (m *AccountedPool) GetTotalShares() types.Coin { - if m != nil { - return m.TotalShares - } - return types.Coin{} -} - -func (m *AccountedPool) GetPoolAssets() []types1.PoolAsset { +func (m *AccountedPool) GetTotalTokens() []types.Coin { if m != nil { - return m.PoolAssets + return m.TotalTokens } return nil } @@ -97,6 +157,7 @@ func (m *AccountedPool) GetNonAmmPoolTokens() []types.Coin { } func init() { + proto.RegisterType((*LegacyAccountedPool)(nil), "elys.accountedpool.LegacyAccountedPool") proto.RegisterType((*AccountedPool)(nil), "elys.accountedpool.AccountedPool") } @@ -105,35 +166,37 @@ func init() { } var fileDescriptor_237592a8964da530 = []byte{ - // 389 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xc1, 0xaa, 0xd3, 0x40, - 0x14, 0x4d, 0xde, 0xab, 0x4f, 0x9c, 0x28, 0x48, 0xaa, 0x98, 0x76, 0x91, 0x06, 0x37, 0x06, 0xa4, - 0x33, 0xb4, 0xee, 0xdc, 0x35, 0xae, 0x0a, 0x52, 0xa4, 0x0a, 0x82, 0x9b, 0x30, 0x49, 0x86, 0x24, - 0x34, 0x33, 0x37, 0x74, 0xa6, 0xd6, 0xfe, 0x85, 0x1f, 0xe3, 0x47, 0x74, 0x59, 0x5c, 0x89, 0x8b, - 0x22, 0xed, 0x8f, 0xc8, 0xcc, 0xa4, 0x14, 0xdd, 0xbc, 0xdd, 0x9c, 0x39, 0xe7, 0xe4, 0x9c, 0x9b, - 0x3b, 0xe8, 0x15, 0x6b, 0x76, 0x92, 0xd0, 0x3c, 0x87, 0x8d, 0x50, 0xac, 0x68, 0x01, 0x9a, 0x2b, - 0x4a, 0x35, 0xc4, 0xed, 0x1a, 0x14, 0xf8, 0xbe, 0x16, 0xe2, 0x7f, 0x84, 0xc3, 0x81, 0x35, 0x73, - 0x4e, 0x34, 0x4c, 0xa9, 0x94, 0x4c, 0x59, 0xf9, 0xf0, 0x59, 0x09, 0x25, 0x98, 0x23, 0xd1, 0xa7, - 0xee, 0x36, 0xcc, 0x41, 0x72, 0x90, 0x24, 0xa3, 0x92, 0x91, 0xaf, 0x93, 0x8c, 0x29, 0x3a, 0x21, - 0x39, 0xd4, 0xa2, 0xe3, 0x07, 0x96, 0x4f, 0xad, 0xd1, 0x02, 0x4b, 0xbd, 0xdc, 0xdf, 0xa0, 0x27, - 0xb3, 0x4b, 0xfa, 0x07, 0x80, 0xc6, 0x7f, 0x81, 0x1e, 0x9a, 0xd8, 0xba, 0x08, 0xdc, 0xc8, 0x8d, - 0x7b, 0xcb, 0x3b, 0x0d, 0xe7, 0x85, 0x9f, 0xa0, 0xc7, 0x0a, 0x14, 0x6d, 0x52, 0x59, 0xd1, 0x35, - 0x93, 0xc1, 0x4d, 0xe4, 0xc6, 0xde, 0x74, 0x80, 0xbb, 0xef, 0xe9, 0x70, 0xdc, 0x85, 0xe3, 0x77, - 0x50, 0x8b, 0xa4, 0xb7, 0x3f, 0x8e, 0x9c, 0xa5, 0x67, 0x4c, 0x1f, 0x8d, 0xc7, 0x7f, 0x8b, 0xbc, - 0xeb, 0x4c, 0x32, 0xb8, 0x8d, 0x6e, 0x63, 0x6f, 0xda, 0xc7, 0xf6, 0x27, 0x70, 0x8e, 0x75, 0x83, - 0x99, 0xe6, 0x3a, 0x33, 0x6a, 0x2f, 0x17, 0xd2, 0x5f, 0x5c, 0xf2, 0xb7, 0xac, 0x2e, 0x2b, 0x15, - 0xf4, 0x22, 0x37, 0x7e, 0x94, 0xbc, 0xd6, 0xba, 0xdf, 0xc7, 0xd1, 0x73, 0x5b, 0x43, 0x16, 0x2b, - 0x5c, 0x03, 0xe1, 0x54, 0x55, 0x78, 0x2e, 0xd4, 0xcf, 0x1f, 0x63, 0xd4, 0xf5, 0x9b, 0x0b, 0xd5, - 0x75, 0xf9, 0x6c, 0xfc, 0xfe, 0x02, 0xf5, 0x05, 0x88, 0x94, 0x72, 0x6e, 0x16, 0x92, 0x2a, 0x58, - 0x31, 0x21, 0x83, 0x07, 0xa6, 0xd3, 0xbd, 0x63, 0x3d, 0x15, 0x20, 0x66, 0x9c, 0xeb, 0xc2, 0x9f, - 0x8c, 0x31, 0x79, 0xbf, 0x3f, 0x85, 0xee, 0xe1, 0x14, 0xba, 0x7f, 0x4e, 0xa1, 0xfb, 0xfd, 0x1c, - 0x3a, 0x87, 0x73, 0xe8, 0xfc, 0x3a, 0x87, 0xce, 0x97, 0x69, 0x59, 0xab, 0x6a, 0x93, 0xe1, 0x1c, - 0x38, 0xd1, 0xa3, 0x8e, 0x05, 0x53, 0x5b, 0x58, 0xaf, 0x0c, 0x20, 0xdf, 0xfe, 0x7b, 0x27, 0x6a, - 0xd7, 0x32, 0x99, 0xdd, 0x99, 0xfd, 0xbc, 0xf9, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x86, 0xe8, - 0xeb, 0x4a, 0x02, 0x00, 0x00, + // 423 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x4f, 0x6b, 0x14, 0x31, + 0x18, 0xc6, 0x37, 0xbb, 0x6b, 0xc5, 0x8c, 0x82, 0xcc, 0x2a, 0xce, 0xf6, 0x30, 0x1d, 0x7a, 0x71, + 0x40, 0x9a, 0xd0, 0xf5, 0xe6, 0x6d, 0xc7, 0xd3, 0x42, 0x29, 0x52, 0x05, 0xc1, 0xcb, 0x90, 0x99, + 0x09, 0x33, 0xc3, 0x4e, 0xf2, 0x0e, 0x9b, 0xd4, 0xba, 0xdf, 0xc2, 0x0f, 0xe3, 0xd1, 0x0f, 0xd0, + 0x93, 0x14, 0x4f, 0xe2, 0xa1, 0xc8, 0xee, 0x17, 0x91, 0xfc, 0x59, 0x8a, 0x82, 0xa8, 0xbd, 0xe5, + 0xc9, 0xfb, 0x3e, 0x79, 0x7e, 0x49, 0x5e, 0xfc, 0x94, 0x77, 0x6b, 0x45, 0x59, 0x59, 0xc2, 0xb9, + 0xd4, 0xbc, 0xea, 0x01, 0xba, 0x1b, 0x95, 0x1b, 0x49, 0xfa, 0x15, 0x68, 0x08, 0x43, 0xd3, 0x48, + 0x7e, 0x69, 0xdc, 0x9f, 0x3a, 0xb3, 0x10, 0xd4, 0xc8, 0x9c, 0x29, 0xc5, 0xb5, 0x6b, 0xdf, 0x7f, + 0x54, 0x43, 0x0d, 0x76, 0x49, 0xcd, 0xca, 0xef, 0xc6, 0x25, 0x28, 0x01, 0x8a, 0x16, 0x4c, 0x71, + 0xfa, 0xfe, 0xb8, 0xe0, 0x9a, 0x1d, 0xd3, 0x12, 0x5a, 0xe9, 0xeb, 0x53, 0x57, 0xcf, 0x9d, 0xd1, + 0x09, 0x57, 0x3a, 0xfc, 0x32, 0xc4, 0x93, 0x13, 0x5e, 0xb3, 0x72, 0x3d, 0xdf, 0x31, 0xbc, 0x02, + 0xe8, 0xc2, 0x27, 0xf8, 0xae, 0x0d, 0x6f, 0xab, 0x08, 0x25, 0x28, 0x1d, 0x9f, 0xed, 0x19, 0xb9, + 0xa8, 0xc2, 0x0c, 0xdf, 0xd7, 0xa0, 0x59, 0x97, 0xab, 0x86, 0xad, 0xb8, 0x8a, 0x86, 0x09, 0x4a, + 0x83, 0xd9, 0x94, 0xf8, 0x53, 0x0d, 0x02, 0xf1, 0x08, 0xe4, 0x25, 0xb4, 0x32, 0x1b, 0x5f, 0x5e, + 0x1f, 0x0c, 0xce, 0x02, 0x6b, 0x7a, 0x6d, 0x3d, 0xe1, 0x0b, 0x1c, 0xdc, 0xdc, 0x4c, 0x45, 0xa3, + 0x64, 0x94, 0x06, 0xb3, 0x09, 0x71, 0x4f, 0x21, 0x04, 0x31, 0x04, 0x73, 0x53, 0xf3, 0x66, 0xdc, + 0xef, 0x36, 0x54, 0x78, 0xba, 0xcb, 0xbf, 0xe0, 0x6d, 0xdd, 0xe8, 0x68, 0x9c, 0xa0, 0xf4, 0x5e, + 0xf6, 0xcc, 0xf4, 0x7d, 0xbf, 0x3e, 0x78, 0xec, 0x30, 0x54, 0xb5, 0x24, 0x2d, 0x50, 0xc1, 0x74, + 0x43, 0x16, 0x52, 0x7f, 0xfd, 0x74, 0x84, 0x3d, 0xdf, 0x42, 0x6a, 0xcf, 0xf2, 0xd6, 0xfa, 0xc3, + 0x53, 0x3c, 0x91, 0x20, 0x73, 0x26, 0x84, 0xfd, 0x96, 0x5c, 0xc3, 0x92, 0x4b, 0x15, 0xdd, 0xb1, + 0x4c, 0x7f, 0xbd, 0xd6, 0x43, 0x09, 0x72, 0x2e, 0x84, 0x01, 0x7e, 0x63, 0x8d, 0x87, 0x9f, 0x11, + 0x7e, 0xf0, 0xbf, 0x4f, 0xe9, 0x33, 0x87, 0xff, 0x96, 0xe9, 0xf0, 0x5d, 0xdc, 0x9f, 0xf0, 0x47, + 0xb7, 0xc4, 0xcf, 0x4e, 0x2e, 0x37, 0x31, 0xba, 0xda, 0xc4, 0xe8, 0xc7, 0x26, 0x46, 0x1f, 0xb7, + 0xf1, 0xe0, 0x6a, 0x1b, 0x0f, 0xbe, 0x6d, 0xe3, 0xc1, 0xbb, 0x59, 0xdd, 0xea, 0xe6, 0xbc, 0x20, + 0x25, 0x08, 0x6a, 0x7e, 0xea, 0x48, 0x72, 0x7d, 0x01, 0xab, 0xa5, 0x15, 0xf4, 0xc3, 0x6f, 0xc3, + 0xae, 0xd7, 0x3d, 0x57, 0xc5, 0x9e, 0x1d, 0xb2, 0xe7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x04, + 0xec, 0x5b, 0xb3, 0x0f, 0x03, 0x00, 0x00, } -func (m *AccountedPool) Marshal() (dAtA []byte, err error) { +func (m *LegacyAccountedPool) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -143,12 +206,12 @@ func (m *AccountedPool) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AccountedPool) MarshalTo(dAtA []byte) (int, error) { +func (m *LegacyAccountedPool) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AccountedPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *LegacyAccountedPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -209,6 +272,62 @@ func (m *AccountedPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AccountedPool) 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 *AccountedPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountedPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NonAmmPoolTokens) > 0 { + for iNdEx := len(m.NonAmmPoolTokens) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.NonAmmPoolTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAccountedPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.TotalTokens) > 0 { + for iNdEx := len(m.TotalTokens) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAccountedPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.PoolId != 0 { + i = encodeVarintAccountedPool(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintAccountedPool(dAtA []byte, offset int, v uint64) int { offset -= sovAccountedPool(v) base := offset @@ -220,7 +339,7 @@ func encodeVarintAccountedPool(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *AccountedPool) Size() (n int) { +func (m *LegacyAccountedPool) Size() (n int) { if m == nil { return 0 } @@ -248,13 +367,37 @@ func (m *AccountedPool) Size() (n int) { return n } +func (m *AccountedPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovAccountedPool(uint64(m.PoolId)) + } + if len(m.TotalTokens) > 0 { + for _, e := range m.TotalTokens { + l = e.Size() + n += 1 + l + sovAccountedPool(uint64(l)) + } + } + if len(m.NonAmmPoolTokens) > 0 { + for _, e := range m.NonAmmPoolTokens { + l = e.Size() + n += 1 + l + sovAccountedPool(uint64(l)) + } + } + return n +} + func sovAccountedPool(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozAccountedPool(x uint64) (n int) { return sovAccountedPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *AccountedPool) Unmarshal(dAtA []byte) error { +func (m *LegacyAccountedPool) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -277,10 +420,10 @@ func (m *AccountedPool) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AccountedPool: wiretype end group for non-group") + return fmt.Errorf("proto: LegacyAccountedPool: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AccountedPool: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LegacyAccountedPool: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -458,6 +601,143 @@ func (m *AccountedPool) Unmarshal(dAtA []byte) error { } return nil } +func (m *AccountedPool) 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 ErrIntOverflowAccountedPool + } + 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: AccountedPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountedPool: 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 ErrIntOverflowAccountedPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalTokens", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccountedPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAccountedPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAccountedPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalTokens = append(m.TotalTokens, types.Coin{}) + if err := m.TotalTokens[len(m.TotalTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonAmmPoolTokens", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAccountedPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAccountedPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAccountedPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonAmmPoolTokens = append(m.NonAmmPoolTokens, types.Coin{}) + if err := m.NonAmmPoolTokens[len(m.NonAmmPoolTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAccountedPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAccountedPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipAccountedPool(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/accountedpool/types/query.pb.go b/x/accountedpool/types/query.pb.go index 8baceeffa..80e07df7e 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 41a8b321c..154953843 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 18c731e26..b3e8b7446 100644 --- a/x/amm/types/query.pb.go +++ b/x/amm/types/query.pb.go @@ -2112,7 +2112,6 @@ func _Query_SwapEstimationByDenom_Handler(srv interface{}, ctx context.Context, 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 243168dde..1f3bb4b19 100644 --- a/x/amm/types/tx.pb.go +++ b/x/amm/types/tx.pb.go @@ -1588,7 +1588,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 6ae69bea4..c5be1ecdc 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 39985877f..43afdc982 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 6cbaf0b42..3bd23c387 100644 --- a/x/burner/types/query.pb.go +++ b/x/burner/types/query.pb.go @@ -487,7 +487,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 60d1f9825..c30813fb1 100644 --- a/x/burner/types/tx.pb.go +++ b/x/burner/types/tx.pb.go @@ -218,7 +218,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 d16220858..8d33b49d7 100644 --- a/x/commitment/types/query.pb.go +++ b/x/commitment/types/query.pb.go @@ -817,7 +817,6 @@ func _Query_CommitmentVestingInfo_Handler(srv interface{}, ctx context.Context, 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 1fc3973e6..8f65161fb 100644 --- a/x/commitment/types/tx.pb.go +++ b/x/commitment/types/tx.pb.go @@ -1468,7 +1468,6 @@ func _Msg_Unstake_Handler(srv interface{}, ctx context.Context, dec func(interfa 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 45a4d5bbd..85ca8b0b0 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 63b24e68b..0b4b58eb8 100644 --- a/x/estaking/types/query.pb.go +++ b/x/estaking/types/query.pb.go @@ -535,7 +535,6 @@ func _Query_Invariant_Handler(srv interface{}, ctx context.Context, dec func(int 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 2187e633f..a9d5a880a 100644 --- a/x/estaking/types/tx.pb.go +++ b/x/estaking/types/tx.pb.go @@ -645,7 +645,6 @@ func _Msg_WithdrawAllRewards_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.estaking.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/leveragelp/types/query.pb.go b/x/leveragelp/types/query.pb.go index 45b5f8f20..a6dbbc076 100644 --- a/x/leveragelp/types/query.pb.go +++ b/x/leveragelp/types/query.pb.go @@ -2158,7 +2158,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 6aecc1755..cda344e01 100644 --- a/x/leveragelp/types/tx.pb.go +++ b/x/leveragelp/types/tx.pb.go @@ -1436,7 +1436,6 @@ func _Msg_ClosePositions_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.leveragelp.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/masterchef/types/query.pb.go b/x/masterchef/types/query.pb.go index 087908b38..0148b56e4 100644 --- a/x/masterchef/types/query.pb.go +++ b/x/masterchef/types/query.pb.go @@ -1957,7 +1957,6 @@ func _Query_PoolRewards_Handler(srv interface{}, ctx context.Context, dec func(i 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 5912f2a37..ca3a9ae67 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 8b2c2f4fd..38e20e060 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -1280,7 +1280,6 @@ func _Query_PriceFeederAll_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.oracle.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 39fcfe945..d88ee7690 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -1323,7 +1323,6 @@ func _Msg_CreateAssetInfo_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.oracle.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/parameter/types/query.pb.go b/x/parameter/types/query.pb.go index 5e460ad8c..1cfe0187a 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 e5f597c2f..bd1937d03 100644 --- a/x/parameter/types/tx.pb.go +++ b/x/parameter/types/tx.pb.go @@ -709,7 +709,6 @@ func _Msg_UpdateRewardsDataLifetime_Handler(srv interface{}, ctx context.Context 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/types/query.pb.go b/x/perpetual/types/query.pb.go index 8d7f051c8..23f70dd52 100644 --- a/x/perpetual/types/query.pb.go +++ b/x/perpetual/types/query.pb.go @@ -2142,7 +2142,6 @@ func _Query_CloseEstimation_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.perpetual.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/perpetual/types/tx.pb.go b/x/perpetual/types/tx.pb.go index 4809a5fdc..8e741fce6 100644 --- a/x/perpetual/types/tx.pb.go +++ b/x/perpetual/types/tx.pb.go @@ -1185,7 +1185,6 @@ func _Msg_UpdateTakeProfitPrice_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.perpetual.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/stablestake/types/query.pb.go b/x/stablestake/types/query.pb.go index 4c000b8f0..a6a256c59 100644 --- a/x/stablestake/types/query.pb.go +++ b/x/stablestake/types/query.pb.go @@ -340,7 +340,6 @@ func _Query_BorrowRatio_Handler(srv interface{}, ctx context.Context, dec func(i 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 8c9259238..97f640998 100644 --- a/x/stablestake/types/tx.pb.go +++ b/x/stablestake/types/tx.pb.go @@ -463,7 +463,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.stablestake.Msg", HandlerType: (*MsgServer)(nil), diff --git a/x/tier/types/query.pb.go b/x/tier/types/query.pb.go index d278108c0..65ae543bd 100644 --- a/x/tier/types/query.pb.go +++ b/x/tier/types/query.pb.go @@ -1750,7 +1750,6 @@ func _Query_GetUsersPoolData_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.tier.Query", HandlerType: (*QueryServer)(nil), diff --git a/x/tier/types/tx.pb.go b/x/tier/types/tx.pb.go index 3f8f67e92..36df4574e 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 90d2fe161..0c048722d 100644 --- a/x/tokenomics/types/query.pb.go +++ b/x/tokenomics/types/query.pb.go @@ -874,7 +874,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 441b60fa1..0667a4462 100644 --- a/x/tokenomics/types/tx.pb.go +++ b/x/tokenomics/types/tx.pb.go @@ -1198,7 +1198,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/query.pb.go b/x/tradeshield/types/query.pb.go index 9ee0bd345..3483d627f 100644 --- a/x/tradeshield/types/query.pb.go +++ b/x/tradeshield/types/query.pb.go @@ -1029,7 +1029,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 ff87d15d5..17a04d6ab 100644 --- a/x/tradeshield/types/tx.pb.go +++ b/x/tradeshield/types/tx.pb.go @@ -1633,7 +1633,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), diff --git a/x/transferhook/types/query.pb.go b/x/transferhook/types/query.pb.go index f15e496a5..38afb9ad9 100644 --- a/x/transferhook/types/query.pb.go +++ b/x/transferhook/types/query.pb.go @@ -210,7 +210,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.transferhook.Query", HandlerType: (*QueryServer)(nil),