diff --git a/api/cosmos/accounts/defaults/lockup/v1/lockup.pulsar.go b/api/cosmos/accounts/defaults/lockup/v1/lockup.pulsar.go index 2855e41a1825..a2549acdf88f 100644 --- a/api/cosmos/accounts/defaults/lockup/v1/lockup.pulsar.go +++ b/api/cosmos/accounts/defaults/lockup/v1/lockup.pulsar.go @@ -5,12 +5,14 @@ import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" @@ -589,6 +591,1126 @@ func (x *fastReflection_Period) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_UnbondingEntries_1_list)(nil) + +type _UnbondingEntries_1_list struct { + list *[]*UnbondingEntry +} + +func (x *_UnbondingEntries_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_UnbondingEntries_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_UnbondingEntries_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UnbondingEntry) + (*x.list)[i] = concreteValue +} + +func (x *_UnbondingEntries_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UnbondingEntry) + *x.list = append(*x.list, concreteValue) +} + +func (x *_UnbondingEntries_1_list) AppendMutable() protoreflect.Value { + v := new(UnbondingEntry) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UnbondingEntries_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_UnbondingEntries_1_list) NewElement() protoreflect.Value { + v := new(UnbondingEntry) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UnbondingEntries_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_UnbondingEntries protoreflect.MessageDescriptor + fd_UnbondingEntries_entries protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_v1_lockup_proto_init() + md_UnbondingEntries = File_cosmos_accounts_defaults_lockup_v1_lockup_proto.Messages().ByName("UnbondingEntries") + fd_UnbondingEntries_entries = md_UnbondingEntries.Fields().ByName("entries") +} + +var _ protoreflect.Message = (*fastReflection_UnbondingEntries)(nil) + +type fastReflection_UnbondingEntries UnbondingEntries + +func (x *UnbondingEntries) ProtoReflect() protoreflect.Message { + return (*fastReflection_UnbondingEntries)(x) +} + +func (x *UnbondingEntries) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_UnbondingEntries_messageType fastReflection_UnbondingEntries_messageType +var _ protoreflect.MessageType = fastReflection_UnbondingEntries_messageType{} + +type fastReflection_UnbondingEntries_messageType struct{} + +func (x fastReflection_UnbondingEntries_messageType) Zero() protoreflect.Message { + return (*fastReflection_UnbondingEntries)(nil) +} +func (x fastReflection_UnbondingEntries_messageType) New() protoreflect.Message { + return new(fastReflection_UnbondingEntries) +} +func (x fastReflection_UnbondingEntries_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_UnbondingEntries +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_UnbondingEntries) Descriptor() protoreflect.MessageDescriptor { + return md_UnbondingEntries +} + +// 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_UnbondingEntries) Type() protoreflect.MessageType { + return _fastReflection_UnbondingEntries_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_UnbondingEntries) New() protoreflect.Message { + return new(fastReflection_UnbondingEntries) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_UnbondingEntries) Interface() protoreflect.ProtoMessage { + return (*UnbondingEntries)(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_UnbondingEntries) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Entries) != 0 { + value := protoreflect.ValueOfList(&_UnbondingEntries_1_list{list: &x.Entries}) + if !f(fd_UnbondingEntries_entries, 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_UnbondingEntries) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntries.entries": + return len(x.Entries) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntries")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntries 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_UnbondingEntries) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntries.entries": + x.Entries = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntries")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntries 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_UnbondingEntries) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntries.entries": + if len(x.Entries) == 0 { + return protoreflect.ValueOfList(&_UnbondingEntries_1_list{}) + } + listValue := &_UnbondingEntries_1_list{list: &x.Entries} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntries")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntries 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_UnbondingEntries) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntries.entries": + lv := value.List() + clv := lv.(*_UnbondingEntries_1_list) + x.Entries = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntries")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntries 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_UnbondingEntries) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntries.entries": + if x.Entries == nil { + x.Entries = []*UnbondingEntry{} + } + value := &_UnbondingEntries_1_list{list: &x.Entries} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntries")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntries 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_UnbondingEntries) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntries.entries": + list := []*UnbondingEntry{} + return protoreflect.ValueOfList(&_UnbondingEntries_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntries")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntries 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_UnbondingEntries) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.UnbondingEntries", 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_UnbondingEntries) 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_UnbondingEntries) 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_UnbondingEntries) 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_UnbondingEntries) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*UnbondingEntries) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Entries) > 0 { + for _, e := range x.Entries { + 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().(*UnbondingEntries) + 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.Entries) > 0 { + for iNdEx := len(x.Entries) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Entries[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + 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().(*UnbondingEntries) + 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: UnbondingEntries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnbondingEntries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Entries", 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.Entries = append(x.Entries, &UnbondingEntry{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Entries[len(x.Entries)-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, + } +} + +var ( + md_UnbondingEntry protoreflect.MessageDescriptor + fd_UnbondingEntry_creation_height protoreflect.FieldDescriptor + fd_UnbondingEntry_end_time protoreflect.FieldDescriptor + fd_UnbondingEntry_amount protoreflect.FieldDescriptor + fd_UnbondingEntry_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_v1_lockup_proto_init() + md_UnbondingEntry = File_cosmos_accounts_defaults_lockup_v1_lockup_proto.Messages().ByName("UnbondingEntry") + fd_UnbondingEntry_creation_height = md_UnbondingEntry.Fields().ByName("creation_height") + fd_UnbondingEntry_end_time = md_UnbondingEntry.Fields().ByName("end_time") + fd_UnbondingEntry_amount = md_UnbondingEntry.Fields().ByName("amount") + fd_UnbondingEntry_validator_address = md_UnbondingEntry.Fields().ByName("validator_address") +} + +var _ protoreflect.Message = (*fastReflection_UnbondingEntry)(nil) + +type fastReflection_UnbondingEntry UnbondingEntry + +func (x *UnbondingEntry) ProtoReflect() protoreflect.Message { + return (*fastReflection_UnbondingEntry)(x) +} + +func (x *UnbondingEntry) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_UnbondingEntry_messageType fastReflection_UnbondingEntry_messageType +var _ protoreflect.MessageType = fastReflection_UnbondingEntry_messageType{} + +type fastReflection_UnbondingEntry_messageType struct{} + +func (x fastReflection_UnbondingEntry_messageType) Zero() protoreflect.Message { + return (*fastReflection_UnbondingEntry)(nil) +} +func (x fastReflection_UnbondingEntry_messageType) New() protoreflect.Message { + return new(fastReflection_UnbondingEntry) +} +func (x fastReflection_UnbondingEntry_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_UnbondingEntry +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_UnbondingEntry) Descriptor() protoreflect.MessageDescriptor { + return md_UnbondingEntry +} + +// 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_UnbondingEntry) Type() protoreflect.MessageType { + return _fastReflection_UnbondingEntry_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_UnbondingEntry) New() protoreflect.Message { + return new(fastReflection_UnbondingEntry) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_UnbondingEntry) Interface() protoreflect.ProtoMessage { + return (*UnbondingEntry)(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_UnbondingEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CreationHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.CreationHeight) + if !f(fd_UnbondingEntry_creation_height, value) { + return + } + } + if x.EndTime != nil { + value := protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + if !f(fd_UnbondingEntry_end_time, value) { + return + } + } + if x.Amount != nil { + value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + if !f(fd_UnbondingEntry_amount, value) { + return + } + } + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_UnbondingEntry_validator_address, 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_UnbondingEntry) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.creation_height": + return x.CreationHeight != int64(0) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.end_time": + return x.EndTime != nil + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.amount": + return x.Amount != nil + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.validator_address": + return x.ValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntry")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntry 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_UnbondingEntry) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.creation_height": + x.CreationHeight = int64(0) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.end_time": + x.EndTime = nil + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.amount": + x.Amount = nil + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.validator_address": + x.ValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntry")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntry 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_UnbondingEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.creation_height": + value := x.CreationHeight + return protoreflect.ValueOfInt64(value) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.end_time": + value := x.EndTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.amount": + value := x.Amount + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntry")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntry 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_UnbondingEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.creation_height": + x.CreationHeight = value.Int() + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.end_time": + x.EndTime = value.Message().Interface().(*timestamppb.Timestamp) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.amount": + x.Amount = value.Message().Interface().(*v1beta1.Coin) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.validator_address": + x.ValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntry")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntry 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_UnbondingEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.end_time": + if x.EndTime == nil { + x.EndTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.amount": + if x.Amount == nil { + x.Amount = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.creation_height": + panic(fmt.Errorf("field creation_height of message cosmos.accounts.defaults.lockup.v1.UnbondingEntry is not mutable")) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.validator_address": + panic(fmt.Errorf("field validator_address of message cosmos.accounts.defaults.lockup.v1.UnbondingEntry is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntry")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntry 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_UnbondingEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.creation_height": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.end_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.amount": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.accounts.defaults.lockup.v1.UnbondingEntry.validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.UnbondingEntry")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.UnbondingEntry 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_UnbondingEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.UnbondingEntry", 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_UnbondingEntry) 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_UnbondingEntry) 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_UnbondingEntry) 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_UnbondingEntry) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*UnbondingEntry) + 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.CreationHeight != 0 { + n += 1 + runtime.Sov(uint64(x.CreationHeight)) + } + if x.EndTime != nil { + l = options.Size(x.EndTime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Amount != nil { + l = options.Size(x.Amount) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*UnbondingEntry) + 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.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0x22 + } + if x.Amount != nil { + encoded, err := options.Marshal(x.Amount) + 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 x.EndTime != nil { + encoded, err := options.Marshal(x.EndTime) + 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.CreationHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationHeight)) + 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().(*UnbondingEntry) + 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: UnbondingEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UnbondingEntry: 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 CreationHeight", wireType) + } + x.CreationHeight = 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.CreationHeight |= int64(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 EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.EndTime == nil { + x.EndTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EndTime); 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 Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Amount == nil { + x.Amount = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + 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 @@ -647,6 +1769,104 @@ func (x *Period) GetAmount() []*v1beta1.Coin { return nil } +type UnbondingEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entries []*UnbondingEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (x *UnbondingEntries) Reset() { + *x = UnbondingEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnbondingEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnbondingEntries) ProtoMessage() {} + +// Deprecated: Use UnbondingEntries.ProtoReflect.Descriptor instead. +func (*UnbondingEntries) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_v1_lockup_proto_rawDescGZIP(), []int{1} +} + +func (x *UnbondingEntries) GetEntries() []*UnbondingEntry { + if x != nil { + return x.Entries + } + return nil +} + +// UnbondingEntry defines an entry tracking the lockup account unbonding operation. +type UnbondingEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` + // end time of entry + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // unbond amount + Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // validator address + ValidatorAddress string `protobuf:"bytes,4,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *UnbondingEntry) Reset() { + *x = UnbondingEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnbondingEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnbondingEntry) ProtoMessage() {} + +// Deprecated: Use UnbondingEntry.ProtoReflect.Descriptor instead. +func (*UnbondingEntry) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_v1_lockup_proto_rawDescGZIP(), []int{2} +} + +func (x *UnbondingEntry) GetCreationHeight() int64 { + if x != nil { + return x.CreationHeight + } + return 0 +} + +func (x *UnbondingEntry) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *UnbondingEntry) GetAmount() *v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *UnbondingEntry) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + var File_cosmos_accounts_defaults_lockup_v1_lockup_proto protoreflect.FileDescriptor var file_cosmos_accounts_defaults_lockup_v1_lockup_proto_rawDesc = []byte{ @@ -659,41 +1879,67 @@ var file_cosmos_accounts_defaults_lockup_v1_lockup_proto_rawDesc = []byte{ 0x6e, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, - 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x79, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0xa0, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, - 0x31, 0x42, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x3c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, - 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, - 0x04, 0x43, 0x41, 0x44, 0x4c, 0xaa, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, - 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x22, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, - 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x26, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4c, - 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x06, 0x50, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 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, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, + 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x60, 0x0a, 0x10, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x22, 0x8d, 0x02, 0x0a, 0x0e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x44, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, + 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x65, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0xa0, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, + 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, + 0x41, 0x44, 0x4c, 0xaa, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x4c, + 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2e, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x26, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, + 0x6b, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -708,20 +1954,26 @@ func file_cosmos_accounts_defaults_lockup_v1_lockup_proto_rawDescGZIP() []byte { return file_cosmos_accounts_defaults_lockup_v1_lockup_proto_rawDescData } -var file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_cosmos_accounts_defaults_lockup_v1_lockup_proto_goTypes = []interface{}{ - (*Period)(nil), // 0: cosmos.accounts.defaults.lockup.v1.Period - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration - (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin + (*Period)(nil), // 0: cosmos.accounts.defaults.lockup.v1.Period + (*UnbondingEntries)(nil), // 1: cosmos.accounts.defaults.lockup.v1.UnbondingEntries + (*UnbondingEntry)(nil), // 2: cosmos.accounts.defaults.lockup.v1.UnbondingEntry + (*durationpb.Duration)(nil), // 3: google.protobuf.Duration + (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp } var file_cosmos_accounts_defaults_lockup_v1_lockup_proto_depIdxs = []int32{ - 1, // 0: cosmos.accounts.defaults.lockup.v1.Period.length:type_name -> google.protobuf.Duration - 2, // 1: cosmos.accounts.defaults.lockup.v1.Period.amount:type_name -> cosmos.base.v1beta1.Coin - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 3, // 0: cosmos.accounts.defaults.lockup.v1.Period.length:type_name -> google.protobuf.Duration + 4, // 1: cosmos.accounts.defaults.lockup.v1.Period.amount:type_name -> cosmos.base.v1beta1.Coin + 2, // 2: cosmos.accounts.defaults.lockup.v1.UnbondingEntries.entries:type_name -> cosmos.accounts.defaults.lockup.v1.UnbondingEntry + 5, // 3: cosmos.accounts.defaults.lockup.v1.UnbondingEntry.end_time:type_name -> google.protobuf.Timestamp + 4, // 4: cosmos.accounts.defaults.lockup.v1.UnbondingEntry.amount: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_cosmos_accounts_defaults_lockup_v1_lockup_proto_init() } @@ -742,6 +1994,30 @@ func file_cosmos_accounts_defaults_lockup_v1_lockup_proto_init() { return nil } } + file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnbondingEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_v1_lockup_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnbondingEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -749,7 +2025,7 @@ func file_cosmos_accounts_defaults_lockup_v1_lockup_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_accounts_defaults_lockup_v1_lockup_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/accounts/defaults/lockup/v1/query.pulsar.go b/api/cosmos/accounts/defaults/lockup/v1/query.pulsar.go index 7294b9bc871e..9c89b0fecd5d 100644 --- a/api/cosmos/accounts/defaults/lockup/v1/query.pulsar.go +++ b/api/cosmos/accounts/defaults/lockup/v1/query.pulsar.go @@ -4,6 +4,7 @@ package lockupv1 import ( v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -1640,23 +1641,25 @@ func (x *fastReflection_QueryLockupAccountInfoResponse) ProtoMethods() *protoifa } var ( - md_QueryLockingPeriodsRequest protoreflect.MessageDescriptor + md_QueryUnbondingEntriesRequest protoreflect.MessageDescriptor + fd_QueryUnbondingEntriesRequest_validator_address protoreflect.FieldDescriptor ) func init() { file_cosmos_accounts_defaults_lockup_v1_query_proto_init() - md_QueryLockingPeriodsRequest = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QueryLockingPeriodsRequest") + md_QueryUnbondingEntriesRequest = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QueryUnbondingEntriesRequest") + fd_QueryUnbondingEntriesRequest_validator_address = md_QueryUnbondingEntriesRequest.Fields().ByName("validator_address") } -var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryUnbondingEntriesRequest)(nil) -type fastReflection_QueryLockingPeriodsRequest QueryLockingPeriodsRequest +type fastReflection_QueryUnbondingEntriesRequest QueryUnbondingEntriesRequest -func (x *QueryLockingPeriodsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsRequest)(x) +func (x *QueryUnbondingEntriesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnbondingEntriesRequest)(x) } -func (x *QueryLockingPeriodsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryUnbondingEntriesRequest) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1668,43 +1671,43 @@ func (x *QueryLockingPeriodsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryLockingPeriodsRequest_messageType fastReflection_QueryLockingPeriodsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsRequest_messageType{} +var _fastReflection_QueryUnbondingEntriesRequest_messageType fastReflection_QueryUnbondingEntriesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnbondingEntriesRequest_messageType{} -type fastReflection_QueryLockingPeriodsRequest_messageType struct{} +type fastReflection_QueryUnbondingEntriesRequest_messageType struct{} -func (x fastReflection_QueryLockingPeriodsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsRequest)(nil) +func (x fastReflection_QueryUnbondingEntriesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnbondingEntriesRequest)(nil) } -func (x fastReflection_QueryLockingPeriodsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsRequest) +func (x fastReflection_QueryUnbondingEntriesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnbondingEntriesRequest) } -func (x fastReflection_QueryLockingPeriodsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsRequest +func (x fastReflection_QueryUnbondingEntriesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnbondingEntriesRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryLockingPeriodsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsRequest +func (x *fastReflection_QueryUnbondingEntriesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnbondingEntriesRequest } // 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_QueryLockingPeriodsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryLockingPeriodsRequest_messageType +func (x *fastReflection_QueryUnbondingEntriesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryUnbondingEntriesRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLockingPeriodsRequest) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsRequest) +func (x *fastReflection_QueryUnbondingEntriesRequest) New() protoreflect.Message { + return new(fastReflection_QueryUnbondingEntriesRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLockingPeriodsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryLockingPeriodsRequest)(x) +func (x *fastReflection_QueryUnbondingEntriesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryUnbondingEntriesRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -1712,7 +1715,13 @@ func (x *fastReflection_QueryLockingPeriodsRequest) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryLockingPeriodsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryUnbondingEntriesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ValidatorAddress != "" { + value := protoreflect.ValueOfString(x.ValidatorAddress) + if !f(fd_QueryUnbondingEntriesRequest_validator_address, value) { + return + } + } } // Has reports whether a field is populated. @@ -1726,13 +1735,15 @@ func (x *fastReflection_QueryLockingPeriodsRequest) Range(f func(protoreflect.Fi // 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_QueryLockingPeriodsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryUnbondingEntriesRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest.validator_address": + return x.ValidatorAddress != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest does not contain field %s", fd.FullName())) } } @@ -1742,13 +1753,15 @@ func (x *fastReflection_QueryLockingPeriodsRequest) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryUnbondingEntriesRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest.validator_address": + x.ValidatorAddress = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest does not contain field %s", fd.FullName())) } } @@ -1758,13 +1771,16 @@ func (x *fastReflection_QueryLockingPeriodsRequest) Clear(fd protoreflect.FieldD // 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_QueryLockingPeriodsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryUnbondingEntriesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest.validator_address": + value := x.ValidatorAddress + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest does not contain field %s", descriptor.FullName())) } } @@ -1778,13 +1794,15 @@ func (x *fastReflection_QueryLockingPeriodsRequest) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryUnbondingEntriesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest.validator_address": + x.ValidatorAddress = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest does not contain field %s", fd.FullName())) } } @@ -1798,36 +1816,1783 @@ func (x *fastReflection_QueryLockingPeriodsRequest) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryUnbondingEntriesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest.validator_address": + panic(fmt.Errorf("field validator_address of message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest 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_QueryLockingPeriodsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryUnbondingEntriesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest.validator_address": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest 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_QueryLockingPeriodsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryUnbondingEntriesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest", 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_QueryUnbondingEntriesRequest) 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_QueryUnbondingEntriesRequest) 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_QueryUnbondingEntriesRequest) 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_QueryUnbondingEntriesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnbondingEntriesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryUnbondingEntriesRequest) + 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.ValidatorAddress) > 0 { + i -= len(x.ValidatorAddress) + copy(dAtA[i:], x.ValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUnbondingEntriesRequest) + 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: QueryUnbondingEntriesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnbondingEntriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryUnbondingEntriesResponse_1_list)(nil) + +type _QueryUnbondingEntriesResponse_1_list struct { + list *[]*UnbondingEntry +} + +func (x *_QueryUnbondingEntriesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryUnbondingEntriesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryUnbondingEntriesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UnbondingEntry) + (*x.list)[i] = concreteValue +} + +func (x *_QueryUnbondingEntriesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UnbondingEntry) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryUnbondingEntriesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(UnbondingEntry) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryUnbondingEntriesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryUnbondingEntriesResponse_1_list) NewElement() protoreflect.Value { + v := new(UnbondingEntry) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryUnbondingEntriesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryUnbondingEntriesResponse protoreflect.MessageDescriptor + fd_QueryUnbondingEntriesResponse_unbonding_entries protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_v1_query_proto_init() + md_QueryUnbondingEntriesResponse = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QueryUnbondingEntriesResponse") + fd_QueryUnbondingEntriesResponse_unbonding_entries = md_QueryUnbondingEntriesResponse.Fields().ByName("unbonding_entries") +} + +var _ protoreflect.Message = (*fastReflection_QueryUnbondingEntriesResponse)(nil) + +type fastReflection_QueryUnbondingEntriesResponse QueryUnbondingEntriesResponse + +func (x *QueryUnbondingEntriesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnbondingEntriesResponse)(x) +} + +func (x *QueryUnbondingEntriesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUnbondingEntriesResponse_messageType fastReflection_QueryUnbondingEntriesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnbondingEntriesResponse_messageType{} + +type fastReflection_QueryUnbondingEntriesResponse_messageType struct{} + +func (x fastReflection_QueryUnbondingEntriesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnbondingEntriesResponse)(nil) +} +func (x fastReflection_QueryUnbondingEntriesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnbondingEntriesResponse) +} +func (x fastReflection_QueryUnbondingEntriesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnbondingEntriesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUnbondingEntriesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnbondingEntriesResponse +} + +// 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_QueryUnbondingEntriesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryUnbondingEntriesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUnbondingEntriesResponse) New() protoreflect.Message { + return new(fastReflection_QueryUnbondingEntriesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUnbondingEntriesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryUnbondingEntriesResponse)(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_QueryUnbondingEntriesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.UnbondingEntries) != 0 { + value := protoreflect.ValueOfList(&_QueryUnbondingEntriesResponse_1_list{list: &x.UnbondingEntries}) + if !f(fd_QueryUnbondingEntriesResponse_unbonding_entries, 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_QueryUnbondingEntriesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse.unbonding_entries": + return len(x.UnbondingEntries) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse 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_QueryUnbondingEntriesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse.unbonding_entries": + x.UnbondingEntries = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse 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_QueryUnbondingEntriesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse.unbonding_entries": + if len(x.UnbondingEntries) == 0 { + return protoreflect.ValueOfList(&_QueryUnbondingEntriesResponse_1_list{}) + } + listValue := &_QueryUnbondingEntriesResponse_1_list{list: &x.UnbondingEntries} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse 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_QueryUnbondingEntriesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse.unbonding_entries": + lv := value.List() + clv := lv.(*_QueryUnbondingEntriesResponse_1_list) + x.UnbondingEntries = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse 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_QueryUnbondingEntriesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse.unbonding_entries": + if x.UnbondingEntries == nil { + x.UnbondingEntries = []*UnbondingEntry{} + } + value := &_QueryUnbondingEntriesResponse_1_list{list: &x.UnbondingEntries} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse 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_QueryUnbondingEntriesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse.unbonding_entries": + list := []*UnbondingEntry{} + return protoreflect.ValueOfList(&_QueryUnbondingEntriesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse 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_QueryUnbondingEntriesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse", 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_QueryUnbondingEntriesResponse) 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_QueryUnbondingEntriesResponse) 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_QueryUnbondingEntriesResponse) 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_QueryUnbondingEntriesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnbondingEntriesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.UnbondingEntries) > 0 { + for _, e := range x.UnbondingEntries { + 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().(*QueryUnbondingEntriesResponse) + 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.UnbondingEntries) > 0 { + for iNdEx := len(x.UnbondingEntries) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.UnbondingEntries[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + 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().(*QueryUnbondingEntriesResponse) + 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: QueryUnbondingEntriesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnbondingEntriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingEntries", 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.UnbondingEntries = append(x.UnbondingEntries, &UnbondingEntry{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnbondingEntries[len(x.UnbondingEntries)-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, + } +} + +var ( + md_QueryLockingPeriodsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_v1_query_proto_init() + md_QueryLockingPeriodsRequest = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QueryLockingPeriodsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsRequest)(nil) + +type fastReflection_QueryLockingPeriodsRequest QueryLockingPeriodsRequest + +func (x *QueryLockingPeriodsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsRequest)(x) +} + +func (x *QueryLockingPeriodsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryLockingPeriodsRequest_messageType fastReflection_QueryLockingPeriodsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsRequest_messageType{} + +type fastReflection_QueryLockingPeriodsRequest_messageType struct{} + +func (x fastReflection_QueryLockingPeriodsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsRequest)(nil) +} +func (x fastReflection_QueryLockingPeriodsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsRequest) +} +func (x fastReflection_QueryLockingPeriodsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockingPeriodsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsRequest +} + +// 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_QueryLockingPeriodsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryLockingPeriodsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockingPeriodsRequest) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockingPeriodsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryLockingPeriodsRequest)(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_QueryLockingPeriodsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryLockingPeriodsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest 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_QueryLockingPeriodsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest 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_QueryLockingPeriodsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest 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_QueryLockingPeriodsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest 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_QueryLockingPeriodsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest 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_QueryLockingPeriodsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest 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_QueryLockingPeriodsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest", 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_QueryLockingPeriodsRequest) 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_QueryLockingPeriodsRequest) 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_QueryLockingPeriodsRequest) 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_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryLockingPeriodsRequest) + 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: QueryLockingPeriodsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryLockingPeriodsResponse_1_list)(nil) + +type _QueryLockingPeriodsResponse_1_list struct { + list *[]*Period +} + +func (x *_QueryLockingPeriodsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + (*x.list)[i] = concreteValue +} + +func (x *_QueryLockingPeriodsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Period) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryLockingPeriodsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Period) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryLockingPeriodsResponse_1_list) NewElement() protoreflect.Value { + v := new(Period) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryLockingPeriodsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryLockingPeriodsResponse protoreflect.MessageDescriptor + fd_QueryLockingPeriodsResponse_locking_periods protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_v1_query_proto_init() + md_QueryLockingPeriodsResponse = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QueryLockingPeriodsResponse") + fd_QueryLockingPeriodsResponse_locking_periods = md_QueryLockingPeriodsResponse.Fields().ByName("locking_periods") +} + +var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsResponse)(nil) + +type fastReflection_QueryLockingPeriodsResponse QueryLockingPeriodsResponse + +func (x *QueryLockingPeriodsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsResponse)(x) +} + +func (x *QueryLockingPeriodsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryLockingPeriodsResponse_messageType fastReflection_QueryLockingPeriodsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsResponse_messageType{} + +type fastReflection_QueryLockingPeriodsResponse_messageType struct{} + +func (x fastReflection_QueryLockingPeriodsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryLockingPeriodsResponse)(nil) +} +func (x fastReflection_QueryLockingPeriodsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsResponse) +} +func (x fastReflection_QueryLockingPeriodsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryLockingPeriodsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryLockingPeriodsResponse +} + +// 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_QueryLockingPeriodsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryLockingPeriodsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryLockingPeriodsResponse) New() protoreflect.Message { + return new(fastReflection_QueryLockingPeriodsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryLockingPeriodsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryLockingPeriodsResponse)(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_QueryLockingPeriodsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.LockingPeriods) != 0 { + value := protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods}) + if !f(fd_QueryLockingPeriodsResponse_locking_periods, 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_QueryLockingPeriodsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": + return len(x.LockingPeriods) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse 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_QueryLockingPeriodsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": + x.LockingPeriods = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse 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_QueryLockingPeriodsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": + if len(x.LockingPeriods) == 0 { + return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{}) + } + listValue := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse 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_QueryLockingPeriodsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": + lv := value.List() + clv := lv.(*_QueryLockingPeriodsResponse_1_list) + x.LockingPeriods = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse 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_QueryLockingPeriodsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": + if x.LockingPeriods == nil { + x.LockingPeriods = []*Period{} + } + value := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse 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_QueryLockingPeriodsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": + list := []*Period{} + return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse 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_QueryLockingPeriodsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse", 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_QueryLockingPeriodsResponse) 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_QueryLockingPeriodsResponse) 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_QueryLockingPeriodsResponse) 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_QueryLockingPeriodsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryLockingPeriodsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.LockingPeriods) > 0 { + for _, e := range x.LockingPeriods { + 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().(*QueryLockingPeriodsResponse) + 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.LockingPeriods) > 0 { + for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + 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().(*QueryLockingPeriodsResponse) + 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: QueryLockingPeriodsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", 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.LockingPeriods = append(x.LockingPeriods, &Period{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-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, + } +} + +var ( + md_QuerySpendableAmountRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_accounts_defaults_lockup_v1_query_proto_init() + md_QuerySpendableAmountRequest = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QuerySpendableAmountRequest") +} + +var _ protoreflect.Message = (*fastReflection_QuerySpendableAmountRequest)(nil) + +type fastReflection_QuerySpendableAmountRequest QuerySpendableAmountRequest + +func (x *QuerySpendableAmountRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySpendableAmountRequest)(x) +} + +func (x *QuerySpendableAmountRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QuerySpendableAmountRequest_messageType fastReflection_QuerySpendableAmountRequest_messageType +var _ protoreflect.MessageType = fastReflection_QuerySpendableAmountRequest_messageType{} + +type fastReflection_QuerySpendableAmountRequest_messageType struct{} + +func (x fastReflection_QuerySpendableAmountRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySpendableAmountRequest)(nil) +} +func (x fastReflection_QuerySpendableAmountRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySpendableAmountRequest) +} +func (x fastReflection_QuerySpendableAmountRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySpendableAmountRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySpendableAmountRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySpendableAmountRequest +} + +// 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_QuerySpendableAmountRequest) Type() protoreflect.MessageType { + return _fastReflection_QuerySpendableAmountRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySpendableAmountRequest) New() protoreflect.Message { + return new(fastReflection_QuerySpendableAmountRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySpendableAmountRequest) Interface() protoreflect.ProtoMessage { + return (*QuerySpendableAmountRequest)(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_QuerySpendableAmountRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySpendableAmountRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest 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_QuerySpendableAmountRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest 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_QuerySpendableAmountRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest 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_QuerySpendableAmountRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest 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_QuerySpendableAmountRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest 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_QuerySpendableAmountRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest")) + } + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest 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_QuerySpendableAmountRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest", d.FullName())) } panic("unreachable") } @@ -1835,7 +3600,7 @@ func (x *fastReflection_QueryLockingPeriodsRequest) WhichOneof(d protoreflect.On // 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_QueryLockingPeriodsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QuerySpendableAmountRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1846,7 +3611,7 @@ func (x *fastReflection_QueryLockingPeriodsRequest) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QuerySpendableAmountRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1858,7 +3623,7 @@ func (x *fastReflection_QueryLockingPeriodsRequest) SetUnknown(fields protorefle // 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_QueryLockingPeriodsRequest) IsValid() bool { +func (x *fastReflection_QuerySpendableAmountRequest) IsValid() bool { return x != nil } @@ -1868,9 +3633,9 @@ func (x *fastReflection_QueryLockingPeriodsRequest) 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_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QuerySpendableAmountRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLockingPeriodsRequest) + x := input.Message.Interface().(*QuerySpendableAmountRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1892,7 +3657,7 @@ func (x *fastReflection_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsRequest) + x := input.Message.Interface().(*QuerySpendableAmountRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1922,7 +3687,7 @@ func (x *fastReflection_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsRequest) + x := input.Message.Interface().(*QuerySpendableAmountRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1954,10 +3719,10 @@ func (x *fastReflection_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySpendableAmountRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySpendableAmountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1995,78 +3760,78 @@ func (x *fastReflection_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.M } } -var _ protoreflect.List = (*_QueryLockingPeriodsResponse_1_list)(nil) +var _ protoreflect.List = (*_QuerySpendableAmountResponse_1_list)(nil) -type _QueryLockingPeriodsResponse_1_list struct { - list *[]*Period +type _QuerySpendableAmountResponse_1_list struct { + list *[]*v1beta1.Coin } -func (x *_QueryLockingPeriodsResponse_1_list) Len() int { +func (x *_QuerySpendableAmountResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_QueryLockingPeriodsResponse_1_list) Get(i int) protoreflect.Value { +func (x *_QuerySpendableAmountResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_QueryLockingPeriodsResponse_1_list) Set(i int, value protoreflect.Value) { +func (x *_QuerySpendableAmountResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_QueryLockingPeriodsResponse_1_list) Append(value protoreflect.Value) { +func (x *_QuerySpendableAmountResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_QueryLockingPeriodsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Period) +func (x *_QuerySpendableAmountResponse_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryLockingPeriodsResponse_1_list) Truncate(n int) { +func (x *_QuerySpendableAmountResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_QueryLockingPeriodsResponse_1_list) NewElement() protoreflect.Value { - v := new(Period) +func (x *_QuerySpendableAmountResponse_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryLockingPeriodsResponse_1_list) IsValid() bool { +func (x *_QuerySpendableAmountResponse_1_list) IsValid() bool { return x.list != nil } var ( - md_QueryLockingPeriodsResponse protoreflect.MessageDescriptor - fd_QueryLockingPeriodsResponse_locking_periods protoreflect.FieldDescriptor + md_QuerySpendableAmountResponse protoreflect.MessageDescriptor + fd_QuerySpendableAmountResponse_spendable_tokens protoreflect.FieldDescriptor ) func init() { file_cosmos_accounts_defaults_lockup_v1_query_proto_init() - md_QueryLockingPeriodsResponse = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QueryLockingPeriodsResponse") - fd_QueryLockingPeriodsResponse_locking_periods = md_QueryLockingPeriodsResponse.Fields().ByName("locking_periods") + md_QuerySpendableAmountResponse = File_cosmos_accounts_defaults_lockup_v1_query_proto.Messages().ByName("QuerySpendableAmountResponse") + fd_QuerySpendableAmountResponse_spendable_tokens = md_QuerySpendableAmountResponse.Fields().ByName("spendable_tokens") } -var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QuerySpendableAmountResponse)(nil) -type fastReflection_QueryLockingPeriodsResponse QueryLockingPeriodsResponse +type fastReflection_QuerySpendableAmountResponse QuerySpendableAmountResponse -func (x *QueryLockingPeriodsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsResponse)(x) +func (x *QuerySpendableAmountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySpendableAmountResponse)(x) } -func (x *QueryLockingPeriodsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[3] +func (x *QuerySpendableAmountResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2077,43 +3842,43 @@ func (x *QueryLockingPeriodsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryLockingPeriodsResponse_messageType fastReflection_QueryLockingPeriodsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsResponse_messageType{} +var _fastReflection_QuerySpendableAmountResponse_messageType fastReflection_QuerySpendableAmountResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySpendableAmountResponse_messageType{} -type fastReflection_QueryLockingPeriodsResponse_messageType struct{} +type fastReflection_QuerySpendableAmountResponse_messageType struct{} -func (x fastReflection_QueryLockingPeriodsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsResponse)(nil) +func (x fastReflection_QuerySpendableAmountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySpendableAmountResponse)(nil) } -func (x fastReflection_QueryLockingPeriodsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsResponse) +func (x fastReflection_QuerySpendableAmountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySpendableAmountResponse) } -func (x fastReflection_QueryLockingPeriodsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsResponse +func (x fastReflection_QuerySpendableAmountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySpendableAmountResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryLockingPeriodsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsResponse +func (x *fastReflection_QuerySpendableAmountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySpendableAmountResponse } // 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_QueryLockingPeriodsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryLockingPeriodsResponse_messageType +func (x *fastReflection_QuerySpendableAmountResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySpendableAmountResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLockingPeriodsResponse) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsResponse) +func (x *fastReflection_QuerySpendableAmountResponse) New() protoreflect.Message { + return new(fastReflection_QuerySpendableAmountResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLockingPeriodsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryLockingPeriodsResponse)(x) +func (x *fastReflection_QuerySpendableAmountResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySpendableAmountResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2121,10 +3886,10 @@ func (x *fastReflection_QueryLockingPeriodsResponse) Interface() protoreflect.Pr // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryLockingPeriodsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.LockingPeriods) != 0 { - value := protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods}) - if !f(fd_QueryLockingPeriodsResponse_locking_periods, value) { +func (x *fastReflection_QuerySpendableAmountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.SpendableTokens) != 0 { + value := protoreflect.ValueOfList(&_QuerySpendableAmountResponse_1_list{list: &x.SpendableTokens}) + if !f(fd_QuerySpendableAmountResponse_spendable_tokens, value) { return } } @@ -2141,15 +3906,15 @@ func (x *fastReflection_QueryLockingPeriodsResponse) Range(f func(protoreflect.F // 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_QueryLockingPeriodsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QuerySpendableAmountResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": - return len(x.LockingPeriods) != 0 + case "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse.spendable_tokens": + return len(x.SpendableTokens) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse does not contain field %s", fd.FullName())) } } @@ -2159,15 +3924,15 @@ func (x *fastReflection_QueryLockingPeriodsResponse) Has(fd protoreflect.FieldDe // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QuerySpendableAmountResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": - x.LockingPeriods = nil + case "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse.spendable_tokens": + x.SpendableTokens = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse does not contain field %s", fd.FullName())) } } @@ -2177,19 +3942,19 @@ func (x *fastReflection_QueryLockingPeriodsResponse) Clear(fd protoreflect.Field // 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_QueryLockingPeriodsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySpendableAmountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": - if len(x.LockingPeriods) == 0 { - return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{}) + case "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse.spendable_tokens": + if len(x.SpendableTokens) == 0 { + return protoreflect.ValueOfList(&_QuerySpendableAmountResponse_1_list{}) } - listValue := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + listValue := &_QuerySpendableAmountResponse_1_list{list: &x.SpendableTokens} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse does not contain field %s", descriptor.FullName())) } } @@ -2203,17 +3968,17 @@ func (x *fastReflection_QueryLockingPeriodsResponse) Get(descriptor protoreflect // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QuerySpendableAmountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": + case "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse.spendable_tokens": lv := value.List() - clv := lv.(*_QueryLockingPeriodsResponse_1_list) - x.LockingPeriods = *clv.list + clv := lv.(*_QuerySpendableAmountResponse_1_list) + x.SpendableTokens = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse does not contain field %s", fd.FullName())) } } @@ -2227,45 +3992,45 @@ func (x *fastReflection_QueryLockingPeriodsResponse) Set(fd protoreflect.FieldDe // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySpendableAmountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": - if x.LockingPeriods == nil { - x.LockingPeriods = []*Period{} + case "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse.spendable_tokens": + if x.SpendableTokens == nil { + x.SpendableTokens = []*v1beta1.Coin{} } - value := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} + value := &_QuerySpendableAmountResponse_1_list{list: &x.SpendableTokens} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse 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_QueryLockingPeriodsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QuerySpendableAmountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods": - list := []*Period{} - return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &list}) + case "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse.spendable_tokens": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_QuerySpendableAmountResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse")) } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse 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_QueryLockingPeriodsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QuerySpendableAmountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse", d.FullName())) } panic("unreachable") } @@ -2273,7 +4038,7 @@ func (x *fastReflection_QueryLockingPeriodsResponse) WhichOneof(d protoreflect.O // 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_QueryLockingPeriodsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QuerySpendableAmountResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2284,7 +4049,7 @@ func (x *fastReflection_QueryLockingPeriodsResponse) GetUnknown() protoreflect.R // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QuerySpendableAmountResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2296,7 +4061,7 @@ func (x *fastReflection_QueryLockingPeriodsResponse) SetUnknown(fields protorefl // 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_QueryLockingPeriodsResponse) IsValid() bool { +func (x *fastReflection_QuerySpendableAmountResponse) IsValid() bool { return x != nil } @@ -2306,9 +4071,9 @@ func (x *fastReflection_QueryLockingPeriodsResponse) 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_QueryLockingPeriodsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QuerySpendableAmountResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLockingPeriodsResponse) + x := input.Message.Interface().(*QuerySpendableAmountResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2320,8 +4085,8 @@ func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface. var n int var l int _ = l - if len(x.LockingPeriods) > 0 { - for _, e := range x.LockingPeriods { + if len(x.SpendableTokens) > 0 { + for _, e := range x.SpendableTokens { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } @@ -2336,7 +4101,7 @@ func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface. } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsResponse) + x := input.Message.Interface().(*QuerySpendableAmountResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2355,9 +4120,9 @@ func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface. i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.LockingPeriods) > 0 { - for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) + if len(x.SpendableTokens) > 0 { + for iNdEx := len(x.SpendableTokens) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SpendableTokens[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2382,7 +4147,7 @@ func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface. }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsResponse) + x := input.Message.Interface().(*QuerySpendableAmountResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2414,15 +4179,15 @@ func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface. fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySpendableAmountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySpendableAmountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SpendableTokens", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2449,8 +4214,8 @@ func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface. if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.LockingPeriods = append(x.LockingPeriods, &Period{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-1]); err != nil { + x.SpendableTokens = append(x.SpendableTokens, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SpendableTokens[len(x.SpendableTokens)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -2629,6 +4394,79 @@ func (x *QueryLockupAccountInfoResponse) GetOwner() string { return "" } +// QueryUnbondingEntriesRequest is used to query the lockup account unbonding entries. +type QueryUnbondingEntriesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *QueryUnbondingEntriesRequest) Reset() { + *x = QueryUnbondingEntriesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnbondingEntriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnbondingEntriesRequest) ProtoMessage() {} + +// Deprecated: Use QueryUnbondingEntriesRequest.ProtoReflect.Descriptor instead. +func (*QueryUnbondingEntriesRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryUnbondingEntriesRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// QueryUnbondingEntriesResponse returns the lockup account unbonding entries. +type QueryUnbondingEntriesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // UnbondingEntry defines the list of unbonding entries. + UnbondingEntries []*UnbondingEntry `protobuf:"bytes,1,rep,name=unbonding_entries,json=unbondingEntries,proto3" json:"unbonding_entries,omitempty"` +} + +func (x *QueryUnbondingEntriesResponse) Reset() { + *x = QueryUnbondingEntriesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnbondingEntriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnbondingEntriesResponse) ProtoMessage() {} + +// Deprecated: Use QueryUnbondingEntriesResponse.ProtoReflect.Descriptor instead. +func (*QueryUnbondingEntriesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryUnbondingEntriesResponse) GetUnbondingEntries() []*UnbondingEntry { + if x != nil { + return x.UnbondingEntries + } + return nil +} + // QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. type QueryLockingPeriodsRequest struct { state protoimpl.MessageState @@ -2639,7 +4477,7 @@ type QueryLockingPeriodsRequest struct { func (x *QueryLockingPeriodsRequest) Reset() { *x = QueryLockingPeriodsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[2] + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2653,7 +4491,7 @@ func (*QueryLockingPeriodsRequest) ProtoMessage() {} // Deprecated: Use QueryLockingPeriodsRequest.ProtoReflect.Descriptor instead. func (*QueryLockingPeriodsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{2} + return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{4} } // QueryLockingPeriodsResponse returns the periodic lockup account locking periods. @@ -2669,7 +4507,7 @@ type QueryLockingPeriodsResponse struct { func (x *QueryLockingPeriodsResponse) Reset() { *x = QueryLockingPeriodsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[3] + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2683,7 +4521,7 @@ func (*QueryLockingPeriodsResponse) ProtoMessage() {} // Deprecated: Use QueryLockingPeriodsResponse.ProtoReflect.Descriptor instead. func (*QueryLockingPeriodsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{3} + return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{5} } func (x *QueryLockingPeriodsResponse) GetLockingPeriods() []*Period { @@ -2693,6 +4531,69 @@ func (x *QueryLockingPeriodsResponse) GetLockingPeriods() []*Period { return nil } +// QuerySpendableAmountRequest is used to query the lockup account total spendable tokens. +type QuerySpendableAmountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QuerySpendableAmountRequest) Reset() { + *x = QuerySpendableAmountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySpendableAmountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySpendableAmountRequest) ProtoMessage() {} + +// Deprecated: Use QuerySpendableAmountRequest.ProtoReflect.Descriptor instead. +func (*QuerySpendableAmountRequest) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{6} +} + +// QuerySpendableAmountResponse returns lockup account total spendable tokens. +type QuerySpendableAmountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SpendableTokens []*v1beta1.Coin `protobuf:"bytes,1,rep,name=spendable_tokens,json=spendableTokens,proto3" json:"spendable_tokens,omitempty"` +} + +func (x *QuerySpendableAmountResponse) Reset() { + *x = QuerySpendableAmountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySpendableAmountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySpendableAmountResponse) ProtoMessage() {} + +// Deprecated: Use QuerySpendableAmountResponse.ProtoReflect.Descriptor instead. +func (*QuerySpendableAmountResponse) Descriptor() ([]byte, []int) { + return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QuerySpendableAmountResponse) GetSpendableTokens() []*v1beta1.Coin { + if x != nil { + return x.SpendableTokens + } + return nil +} + var File_cosmos_accounts_defaults_lockup_v1_query_proto protoreflect.FileDescriptor var file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDesc = []byte{ @@ -2709,85 +4610,113 @@ var file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, 0x1d, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfe, 0x05, - 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x76, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, 0x63, - 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x72, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x65, 0x65, 0x12, 0x78, 0x0a, 0x11, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, - 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x1f, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfe, 0x05, 0x0a, 0x1e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x10, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x12, 0x72, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x64, 0x46, 0x72, 0x65, 0x65, 0x12, 0x78, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 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, 0x30, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, + 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x12, 0x3f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x6e, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, + 0x72, 0x0a, 0x0e, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x69, 0x6e, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, - 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x63, - 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0e, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x75, 0x6e, 0x6c, 0x6f, 0x63, - 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x1c, - 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x72, 0x0a, 0x1b, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x6c, - 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, - 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, - 0x42, 0x9f, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, + 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x6e, 0x0a, 0x1c, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x1d, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x11, 0x75, + 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x6c, - 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x4c, 0xaa, 0x02, - 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, - 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x26, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x75, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x72, 0x0a, 0x1b, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x6c, 0x6f, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x0e, + 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x22, 0x1d, + 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x96, 0x01, + 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, + 0x0a, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x61, 0x62, 0x6c, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x42, 0x9f, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x3c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, + 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x04, + 0x43, 0x41, 0x44, 0x4c, 0xaa, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, + 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x2e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x26, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, + 0x63, 0x6b, 0x75, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2802,30 +4731,37 @@ func file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDescData } -var file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_cosmos_accounts_defaults_lockup_v1_query_proto_goTypes = []interface{}{ (*QueryLockupAccountInfoRequest)(nil), // 0: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoRequest (*QueryLockupAccountInfoResponse)(nil), // 1: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse - (*QueryLockingPeriodsRequest)(nil), // 2: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest - (*QueryLockingPeriodsResponse)(nil), // 3: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*Period)(nil), // 6: cosmos.accounts.defaults.lockup.v1.Period + (*QueryUnbondingEntriesRequest)(nil), // 2: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest + (*QueryUnbondingEntriesResponse)(nil), // 3: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse + (*QueryLockingPeriodsRequest)(nil), // 4: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest + (*QueryLockingPeriodsResponse)(nil), // 5: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse + (*QuerySpendableAmountRequest)(nil), // 6: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest + (*QuerySpendableAmountResponse)(nil), // 7: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*UnbondingEntry)(nil), // 10: cosmos.accounts.defaults.lockup.v1.UnbondingEntry + (*Period)(nil), // 11: cosmos.accounts.defaults.lockup.v1.Period } var file_cosmos_accounts_defaults_lockup_v1_query_proto_depIdxs = []int32{ - 4, // 0: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.original_locking:type_name -> cosmos.base.v1beta1.Coin - 4, // 1: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.delegated_free:type_name -> cosmos.base.v1beta1.Coin - 4, // 2: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.delegated_locking:type_name -> cosmos.base.v1beta1.Coin - 5, // 3: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.start_time:type_name -> google.protobuf.Timestamp - 5, // 4: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.end_time:type_name -> google.protobuf.Timestamp - 4, // 5: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.locked_coins:type_name -> cosmos.base.v1beta1.Coin - 4, // 6: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.unlocked_coins:type_name -> cosmos.base.v1beta1.Coin - 6, // 7: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods:type_name -> cosmos.accounts.defaults.lockup.v1.Period - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 8, // 0: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.original_locking:type_name -> cosmos.base.v1beta1.Coin + 8, // 1: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.delegated_free:type_name -> cosmos.base.v1beta1.Coin + 8, // 2: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.delegated_locking:type_name -> cosmos.base.v1beta1.Coin + 9, // 3: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.start_time:type_name -> google.protobuf.Timestamp + 9, // 4: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.end_time:type_name -> google.protobuf.Timestamp + 8, // 5: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.locked_coins:type_name -> cosmos.base.v1beta1.Coin + 8, // 6: cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse.unlocked_coins:type_name -> cosmos.base.v1beta1.Coin + 10, // 7: cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse.unbonding_entries:type_name -> cosmos.accounts.defaults.lockup.v1.UnbondingEntry + 11, // 8: cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse.locking_periods:type_name -> cosmos.accounts.defaults.lockup.v1.Period + 8, // 9: cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse.spendable_tokens:type_name -> cosmos.base.v1beta1.Coin + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_cosmos_accounts_defaults_lockup_v1_query_proto_init() } @@ -2860,7 +4796,7 @@ func file_cosmos_accounts_defaults_lockup_v1_query_proto_init() { } } file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLockingPeriodsRequest); i { + switch v := v.(*QueryUnbondingEntriesRequest); i { case 0: return &v.state case 1: @@ -2872,6 +4808,30 @@ func file_cosmos_accounts_defaults_lockup_v1_query_proto_init() { } } file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryUnbondingEntriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLockingPeriodsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryLockingPeriodsResponse); i { case 0: return &v.state @@ -2883,6 +4843,30 @@ func file_cosmos_accounts_defaults_lockup_v1_query_proto_init() { return nil } } + file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySpendableAmountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_accounts_defaults_lockup_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySpendableAmountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2890,7 +4874,7 @@ func file_cosmos_accounts_defaults_lockup_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_accounts_defaults_lockup_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/accounts/defaults/lockup/v1/tx.pulsar.go b/api/cosmos/accounts/defaults/lockup/v1/tx.pulsar.go index 6c690258c20f..985f4799aad4 100644 --- a/api/cosmos/accounts/defaults/lockup/v1/tx.pulsar.go +++ b/api/cosmos/accounts/defaults/lockup/v1/tx.pulsar.go @@ -4672,1172 +4672,6 @@ func (x *fastReflection_MsgExecuteMessagesResponse) ProtoMethods() *protoiface.M } } -var _ protoreflect.List = (*_MsgWithdraw_3_list)(nil) - -type _MsgWithdraw_3_list struct { - list *[]string -} - -func (x *_MsgWithdraw_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgWithdraw_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_MsgWithdraw_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgWithdraw_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgWithdraw_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgWithdraw at list field Denoms as it is not of Message kind")) -} - -func (x *_MsgWithdraw_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgWithdraw_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgWithdraw_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgWithdraw protoreflect.MessageDescriptor - fd_MsgWithdraw_withdrawer protoreflect.FieldDescriptor - fd_MsgWithdraw_to_address protoreflect.FieldDescriptor - fd_MsgWithdraw_denoms protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_defaults_lockup_v1_tx_proto_init() - md_MsgWithdraw = File_cosmos_accounts_defaults_lockup_v1_tx_proto.Messages().ByName("MsgWithdraw") - fd_MsgWithdraw_withdrawer = md_MsgWithdraw.Fields().ByName("withdrawer") - fd_MsgWithdraw_to_address = md_MsgWithdraw.Fields().ByName("to_address") - fd_MsgWithdraw_denoms = md_MsgWithdraw.Fields().ByName("denoms") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdraw)(nil) - -type fastReflection_MsgWithdraw MsgWithdraw - -func (x *MsgWithdraw) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdraw)(x) -} - -func (x *MsgWithdraw) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdraw_messageType fastReflection_MsgWithdraw_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdraw_messageType{} - -type fastReflection_MsgWithdraw_messageType struct{} - -func (x fastReflection_MsgWithdraw_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdraw)(nil) -} -func (x fastReflection_MsgWithdraw_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdraw) -} -func (x fastReflection_MsgWithdraw_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdraw -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdraw) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdraw -} - -// 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_MsgWithdraw) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdraw_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdraw) New() protoreflect.Message { - return new(fastReflection_MsgWithdraw) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdraw) Interface() protoreflect.ProtoMessage { - return (*MsgWithdraw)(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_MsgWithdraw) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Withdrawer != "" { - value := protoreflect.ValueOfString(x.Withdrawer) - if !f(fd_MsgWithdraw_withdrawer, value) { - return - } - } - if x.ToAddress != "" { - value := protoreflect.ValueOfString(x.ToAddress) - if !f(fd_MsgWithdraw_to_address, value) { - return - } - } - if len(x.Denoms) != 0 { - value := protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &x.Denoms}) - if !f(fd_MsgWithdraw_denoms, 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_MsgWithdraw) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.withdrawer": - return x.Withdrawer != "" - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.to_address": - return x.ToAddress != "" - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.denoms": - return len(x.Denoms) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdraw 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_MsgWithdraw) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.withdrawer": - x.Withdrawer = "" - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.to_address": - x.ToAddress = "" - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.denoms": - x.Denoms = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdraw 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_MsgWithdraw) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.withdrawer": - value := x.Withdrawer - return protoreflect.ValueOfString(value) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.to_address": - value := x.ToAddress - return protoreflect.ValueOfString(value) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.denoms": - if len(x.Denoms) == 0 { - return protoreflect.ValueOfList(&_MsgWithdraw_3_list{}) - } - listValue := &_MsgWithdraw_3_list{list: &x.Denoms} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdraw 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_MsgWithdraw) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.withdrawer": - x.Withdrawer = value.Interface().(string) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.to_address": - x.ToAddress = value.Interface().(string) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.denoms": - lv := value.List() - clv := lv.(*_MsgWithdraw_3_list) - x.Denoms = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdraw 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_MsgWithdraw) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.denoms": - if x.Denoms == nil { - x.Denoms = []string{} - } - value := &_MsgWithdraw_3_list{list: &x.Denoms} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.withdrawer": - panic(fmt.Errorf("field withdrawer of message cosmos.accounts.defaults.lockup.v1.MsgWithdraw is not mutable")) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.to_address": - panic(fmt.Errorf("field to_address of message cosmos.accounts.defaults.lockup.v1.MsgWithdraw is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdraw 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_MsgWithdraw) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.withdrawer": - return protoreflect.ValueOfString("") - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.to_address": - return protoreflect.ValueOfString("") - case "cosmos.accounts.defaults.lockup.v1.MsgWithdraw.denoms": - list := []string{} - return protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdraw 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_MsgWithdraw) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.MsgWithdraw", 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_MsgWithdraw) 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_MsgWithdraw) 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_MsgWithdraw) 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_MsgWithdraw) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdraw) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Withdrawer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ToAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Denoms) > 0 { - for _, s := range x.Denoms { - l = len(s) - 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().(*MsgWithdraw) - 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.Denoms) > 0 { - for iNdEx := len(x.Denoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Denoms[iNdEx]) - copy(dAtA[i:], x.Denoms[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denoms[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ToAddress) > 0 { - i -= len(x.ToAddress) - copy(dAtA[i:], x.ToAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.Withdrawer) > 0 { - i -= len(x.Withdrawer) - copy(dAtA[i:], x.Withdrawer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Withdrawer))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdraw) - 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: MsgWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Withdrawer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denoms = append(x.Denoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgWithdrawResponse_2_list)(nil) - -type _MsgWithdrawResponse_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgWithdrawResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgWithdrawResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgWithdrawResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgWithdrawResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgWithdrawResponse_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgWithdrawResponse_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgWithdrawResponse protoreflect.MessageDescriptor - fd_MsgWithdrawResponse_receiver protoreflect.FieldDescriptor - fd_MsgWithdrawResponse_amount_received protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_accounts_defaults_lockup_v1_tx_proto_init() - md_MsgWithdrawResponse = File_cosmos_accounts_defaults_lockup_v1_tx_proto.Messages().ByName("MsgWithdrawResponse") - fd_MsgWithdrawResponse_receiver = md_MsgWithdrawResponse.Fields().ByName("receiver") - fd_MsgWithdrawResponse_amount_received = md_MsgWithdrawResponse.Fields().ByName("amount_received") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawResponse)(nil) - -type fastReflection_MsgWithdrawResponse MsgWithdrawResponse - -func (x *MsgWithdrawResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawResponse)(x) -} - -func (x *MsgWithdrawResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawResponse_messageType fastReflection_MsgWithdrawResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawResponse_messageType{} - -type fastReflection_MsgWithdrawResponse_messageType struct{} - -func (x fastReflection_MsgWithdrawResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawResponse)(nil) -} -func (x fastReflection_MsgWithdrawResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawResponse) -} -func (x fastReflection_MsgWithdrawResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawResponse -} - -// 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_MsgWithdrawResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawResponse) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawResponse) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawResponse)(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_MsgWithdrawResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Receiver != "" { - value := protoreflect.ValueOfString(x.Receiver) - if !f(fd_MsgWithdrawResponse_receiver, value) { - return - } - } - if len(x.AmountReceived) != 0 { - value := protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &x.AmountReceived}) - if !f(fd_MsgWithdrawResponse_amount_received, 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_MsgWithdrawResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.receiver": - return x.Receiver != "" - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.amount_received": - return len(x.AmountReceived) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse 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_MsgWithdrawResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.receiver": - x.Receiver = "" - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.amount_received": - x.AmountReceived = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse 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_MsgWithdrawResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.receiver": - value := x.Receiver - return protoreflect.ValueOfString(value) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.amount_received": - if len(x.AmountReceived) == 0 { - return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{}) - } - listValue := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse 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_MsgWithdrawResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.receiver": - x.Receiver = value.Interface().(string) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.amount_received": - lv := value.List() - clv := lv.(*_MsgWithdrawResponse_2_list) - x.AmountReceived = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse 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_MsgWithdrawResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.amount_received": - if x.AmountReceived == nil { - x.AmountReceived = []*v1beta1.Coin{} - } - value := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} - return protoreflect.ValueOfList(value) - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.receiver": - panic(fmt.Errorf("field receiver of message cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse 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_MsgWithdrawResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.receiver": - return protoreflect.ValueOfString("") - case "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.amount_received": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse 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_MsgWithdrawResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse", 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_MsgWithdrawResponse) 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_MsgWithdrawResponse) 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_MsgWithdrawResponse) 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_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Receiver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.AmountReceived) > 0 { - for _, e := range x.AmountReceived { - 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().(*MsgWithdrawResponse) - 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.AmountReceived) > 0 { - for iNdEx := len(x.AmountReceived) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.AmountReceived[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 len(x.Receiver) > 0 { - i -= len(x.Receiver) - copy(dAtA[i:], x.Receiver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawResponse) - 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: MsgWithdrawResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountReceived", 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.AmountReceived = append(x.AmountReceived, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountReceived[len(x.AmountReceived)-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 @@ -6253,103 +5087,6 @@ func (x *MsgExecuteMessagesResponse) GetResponses() []*anypb.Any { return nil } -// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of -// choice -type MsgWithdraw struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Withdrawer string `protobuf:"bytes,1,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Denoms []string `protobuf:"bytes,3,rep,name=denoms,proto3" json:"denoms,omitempty"` -} - -func (x *MsgWithdraw) Reset() { - *x = MsgWithdraw{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdraw) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdraw) ProtoMessage() {} - -// Deprecated: Use MsgWithdraw.ProtoReflect.Descriptor instead. -func (*MsgWithdraw) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_defaults_lockup_v1_tx_proto_rawDescGZIP(), []int{9} -} - -func (x *MsgWithdraw) GetWithdrawer() string { - if x != nil { - return x.Withdrawer - } - return "" -} - -func (x *MsgWithdraw) GetToAddress() string { - if x != nil { - return x.ToAddress - } - return "" -} - -func (x *MsgWithdraw) GetDenoms() []string { - if x != nil { - return x.Denoms - } - return nil -} - -// MsgWithdrawResponse defines the response for MsgWithdraw -type MsgWithdrawResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` - AmountReceived []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` -} - -func (x *MsgWithdrawResponse) Reset() { - *x = MsgWithdrawResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawResponse) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawResponse.ProtoReflect.Descriptor instead. -func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { - return file_cosmos_accounts_defaults_lockup_v1_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgWithdrawResponse) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *MsgWithdrawResponse) GetAmountReceived() []*v1beta1.Coin { - if x != nil { - return x.AmountReceived - } - return nil -} - var File_cosmos_accounts_defaults_lockup_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_accounts_defaults_lockup_v1_tx_proto_rawDesc = []byte{ @@ -6473,50 +5210,25 @@ var file_cosmos_accounts_defaults_lockup_v1_tx_proto_rawDesc = []byte{ 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x12, - 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, - 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, - 0x3a, 0x17, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x22, 0xd8, 0x01, 0x0a, 0x13, 0x4d, 0x73, - 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 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, 0x46, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, - 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x42, 0x9c, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x76, 0x31, 0x3b, - 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x4c, 0xaa, - 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, - 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, - 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2e, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x26, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x42, 0x9c, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x76, 0x31, + 0x3b, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x4c, + 0xaa, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, + 0x75, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2e, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x26, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6531,7 +5243,7 @@ func file_cosmos_accounts_defaults_lockup_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_accounts_defaults_lockup_v1_tx_proto_rawDescData } -var file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_cosmos_accounts_defaults_lockup_v1_tx_proto_goTypes = []interface{}{ (*MsgInitLockupAccount)(nil), // 0: cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccount (*MsgInitLockupAccountResponse)(nil), // 1: cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccountResponse @@ -6542,28 +5254,25 @@ var file_cosmos_accounts_defaults_lockup_v1_tx_proto_goTypes = []interface{}{ (*MsgWithdrawReward)(nil), // 6: cosmos.accounts.defaults.lockup.v1.MsgWithdrawReward (*MsgSend)(nil), // 7: cosmos.accounts.defaults.lockup.v1.MsgSend (*MsgExecuteMessagesResponse)(nil), // 8: cosmos.accounts.defaults.lockup.v1.MsgExecuteMessagesResponse - (*MsgWithdraw)(nil), // 9: cosmos.accounts.defaults.lockup.v1.MsgWithdraw - (*MsgWithdrawResponse)(nil), // 10: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse - (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp - (*Period)(nil), // 12: cosmos.accounts.defaults.lockup.v1.Period - (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 14: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*Period)(nil), // 10: cosmos.accounts.defaults.lockup.v1.Period + (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 12: google.protobuf.Any } var file_cosmos_accounts_defaults_lockup_v1_tx_proto_depIdxs = []int32{ - 11, // 0: cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccount.end_time:type_name -> google.protobuf.Timestamp - 11, // 1: cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccount.start_time:type_name -> google.protobuf.Timestamp - 11, // 2: cosmos.accounts.defaults.lockup.v1.MsgInitPeriodicLockingAccount.start_time:type_name -> google.protobuf.Timestamp - 12, // 3: cosmos.accounts.defaults.lockup.v1.MsgInitPeriodicLockingAccount.locking_periods:type_name -> cosmos.accounts.defaults.lockup.v1.Period - 13, // 4: cosmos.accounts.defaults.lockup.v1.MsgDelegate.amount:type_name -> cosmos.base.v1beta1.Coin - 13, // 5: cosmos.accounts.defaults.lockup.v1.MsgUndelegate.amount:type_name -> cosmos.base.v1beta1.Coin - 13, // 6: cosmos.accounts.defaults.lockup.v1.MsgSend.amount:type_name -> cosmos.base.v1beta1.Coin - 14, // 7: cosmos.accounts.defaults.lockup.v1.MsgExecuteMessagesResponse.responses:type_name -> google.protobuf.Any - 13, // 8: cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse.amount_received:type_name -> cosmos.base.v1beta1.Coin - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 9, // 0: cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccount.end_time:type_name -> google.protobuf.Timestamp + 9, // 1: cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccount.start_time:type_name -> google.protobuf.Timestamp + 9, // 2: cosmos.accounts.defaults.lockup.v1.MsgInitPeriodicLockingAccount.start_time:type_name -> google.protobuf.Timestamp + 10, // 3: cosmos.accounts.defaults.lockup.v1.MsgInitPeriodicLockingAccount.locking_periods:type_name -> cosmos.accounts.defaults.lockup.v1.Period + 11, // 4: cosmos.accounts.defaults.lockup.v1.MsgDelegate.amount:type_name -> cosmos.base.v1beta1.Coin + 11, // 5: cosmos.accounts.defaults.lockup.v1.MsgUndelegate.amount:type_name -> cosmos.base.v1beta1.Coin + 11, // 6: cosmos.accounts.defaults.lockup.v1.MsgSend.amount:type_name -> cosmos.base.v1beta1.Coin + 12, // 7: cosmos.accounts.defaults.lockup.v1.MsgExecuteMessagesResponse.responses:type_name -> google.protobuf.Any + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cosmos_accounts_defaults_lockup_v1_tx_proto_init() } @@ -6681,30 +5390,6 @@ func file_cosmos_accounts_defaults_lockup_v1_tx_proto_init() { return nil } } - file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdraw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_accounts_defaults_lockup_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -6712,7 +5397,7 @@ func file_cosmos_accounts_defaults_lockup_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_accounts_defaults_lockup_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/tests/integration/accounts/lockup/continous_lockup_test_suite.go b/tests/integration/accounts/lockup/continous_lockup_test_suite.go index 2fbc794edee9..f3de1f753319 100644 --- a/tests/integration/accounts/lockup/continous_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/continous_lockup_test_suite.go @@ -23,11 +23,11 @@ func (s *IntegrationTestSuite) TestContinuousLockingAccount() { ctx := sdk.NewContext(app.CommitMultiStore(), false, app.Logger()).WithHeaderInfo(header.Info{ Time: currentTime, }) + s.setupStakingParams(ctx, app) ownerAddrStr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) require.NoError(t, err) s.fundAccount(app, ctx, accOwner, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000000))}) randAcc := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - withdrawAcc := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) _, accountAddr, err := app.AccountsKeeper.Init(ctx, lockupaccount.CONTINUOUS_LOCKING_ACCOUNT, accOwner, &types.MsgInitLockupAccount{ Owner: ownerAddrStr, @@ -62,19 +62,6 @@ func (s *IntegrationTestSuite) TestContinuousLockingAccount() { err := s.executeTx(ctx, msg, app, accountAddr, accOwner) require.NotNil(t, err) }) - t.Run("error - execute withdraw message, no withdrawable token", func(t *testing.T) { - ownerAddr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) - require.NoError(t, err) - withdrawAddr, err := app.AuthKeeper.AddressCodec().BytesToString(withdrawAcc) - require.NoError(t, err) - msg := &types.MsgWithdraw{ - Withdrawer: ownerAddr, - ToAddress: withdrawAddr, - Denoms: []string{"stake"}, - } - err = s.executeTx(ctx, msg, app, accountAddr, accOwner) - require.NotNil(t, err) - }) // Update context time // 12 sec = 1/5 of a minute so 200stake should be released @@ -95,23 +82,7 @@ func (s *IntegrationTestSuite) TestContinuousLockingAccount() { balance := app.BankKeeper.GetBalance(ctx, randAcc, "stake") require.True(t, balance.Amount.Equal(math.NewInt(100))) }) - t.Run("ok - execute withdraw message", func(t *testing.T) { - ownerAddr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) - require.NoError(t, err) - withdrawAddr, err := app.AuthKeeper.AddressCodec().BytesToString(withdrawAcc) - require.NoError(t, err) - msg := &types.MsgWithdraw{ - Withdrawer: ownerAddr, - ToAddress: withdrawAddr, - Denoms: []string{"stake"}, - } - err = s.executeTx(ctx, msg, app, accountAddr, accOwner) - require.NoError(t, err) - // withdrawable amount should be 200 - 100 = 100stake - balance := app.BankKeeper.GetBalance(ctx, withdrawAcc, "stake") - require.True(t, balance.Amount.Equal(math.NewInt(100))) - }) t.Run("ok - execute delegate message", func(t *testing.T) { msg := &types.MsgDelegate{ Sender: ownerAddrStr, @@ -163,10 +134,11 @@ func (s *IntegrationTestSuite) TestContinuousLockingAccount() { require.NoError(t, err) require.Equal(t, len(ubd.Entries), 1) - // check if tracking is updated accordingly - lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) - delLocking := lockupAccountInfoResponse.DelegatedLocking - require.True(t, delLocking.AmountOf("stake").Equal(math.ZeroInt())) + // check if an entry is added + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.True(t, entries[0].Amount.Amount.Equal(math.NewInt(100))) + require.True(t, entries[0].ValidatorAddress == val.OperatorAddress) }) // Update context time to end time @@ -174,6 +146,10 @@ func (s *IntegrationTestSuite) TestContinuousLockingAccount() { Time: currentTime.Add(time.Minute), }) + // trigger endblock for staking to handle matured unbonding delegation + _, err = app.StakingKeeper.EndBlocker(ctx) + require.NoError(t, err) + // test if tracking delegate work perfectly t.Run("ok - execute delegate message", func(t *testing.T) { msg := &types.MsgDelegate{ @@ -196,8 +172,14 @@ func (s *IntegrationTestSuite) TestContinuousLockingAccount() { // check if tracking is updated accordingly lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) delLocking := lockupAccountInfoResponse.DelegatedLocking + // should be update as ubd entry is matured require.True(t, delLocking.AmountOf("stake").Equal(math.ZeroInt())) delFree := lockupAccountInfoResponse.DelegatedFree require.True(t, delFree.AmountOf("stake").Equal(math.NewInt(100))) + + // check if the entry is removed + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.Len(t, entries, 0) }) } diff --git a/tests/integration/accounts/lockup/delayed_lockup_test_suite.go b/tests/integration/accounts/lockup/delayed_lockup_test_suite.go index ff1131403fb8..046240d9df3d 100644 --- a/tests/integration/accounts/lockup/delayed_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/delayed_lockup_test_suite.go @@ -23,11 +23,11 @@ func (s *IntegrationTestSuite) TestDelayedLockingAccount() { ctx := sdk.NewContext(app.CommitMultiStore(), false, app.Logger()).WithHeaderInfo(header.Info{ Time: currentTime, }) + s.setupStakingParams(ctx, app) ownerAddrStr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) require.NoError(t, err) s.fundAccount(app, ctx, accOwner, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000000))}) randAcc := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - withdrawAcc := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) _, accountAddr, err := app.AccountsKeeper.Init(ctx, lockupaccount.DELAYED_LOCKING_ACCOUNT, accOwner, &types.MsgInitLockupAccount{ Owner: ownerAddrStr, @@ -61,19 +61,6 @@ func (s *IntegrationTestSuite) TestDelayedLockingAccount() { err := s.executeTx(ctx, msg, app, accountAddr, accOwner) require.NotNil(t, err) }) - t.Run("error - execute withdraw message, no withdrawable token", func(t *testing.T) { - ownerAddr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) - require.NoError(t, err) - withdrawAddr, err := app.AuthKeeper.AddressCodec().BytesToString(withdrawAcc) - require.NoError(t, err) - msg := &types.MsgWithdraw{ - Withdrawer: ownerAddr, - ToAddress: withdrawAddr, - Denoms: []string{"stake"}, - } - err = s.executeTx(ctx, msg, app, accountAddr, accOwner) - require.NotNil(t, err) - }) t.Run("ok - execute delegate message", func(t *testing.T) { msg := &types.MsgDelegate{ Sender: ownerAddrStr, @@ -125,18 +112,24 @@ func (s *IntegrationTestSuite) TestDelayedLockingAccount() { require.NoError(t, err) require.Equal(t, len(ubd.Entries), 1) - // check if tracking is updated accordingly - lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) - delLocking := lockupAccountInfoResponse.DelegatedLocking - require.True(t, delLocking.AmountOf("stake").Equal(math.ZeroInt())) + // check if an entry is added + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.True(t, entries[0].Amount.Amount.Equal(math.NewInt(100))) + require.True(t, entries[0].ValidatorAddress == val.OperatorAddress) }) // Update context time // After endtime fund should be unlock + // And unbond time elapsed ctx = ctx.WithHeaderInfo(header.Info{ Time: currentTime.Add(time.Second * 61), }) + // trigger endblock for staking to handle matured unbonding delegation + _, err = app.StakingKeeper.EndBlocker(ctx) + require.NoError(t, err) + // Check if token is sendable after unlock t.Run("ok - execute send message", func(t *testing.T) { msg := &types.MsgSend{ @@ -149,24 +142,15 @@ func (s *IntegrationTestSuite) TestDelayedLockingAccount() { balance := app.BankKeeper.GetBalance(ctx, randAcc, "stake") require.True(t, balance.Amount.Equal(math.NewInt(100))) - }) - // Test to withdraw all the remain funds to an account of choice - t.Run("ok - execute withdraw message", func(t *testing.T) { - ownerAddr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) - require.NoError(t, err) - withdrawAddr, err := app.AuthKeeper.AddressCodec().BytesToString(withdrawAcc) - require.NoError(t, err) - msg := &types.MsgWithdraw{ - Withdrawer: ownerAddr, - ToAddress: withdrawAddr, - Denoms: []string{"stake"}, - } - err = s.executeTx(ctx, msg, app, accountAddr, accOwner) - require.NoError(t, err) - // withdrawable amount should be - // 1000stake - 100stake( above sent amt ) - 100stake(above delegate amt) = 800stake - balance := app.BankKeeper.GetBalance(ctx, withdrawAcc, "stake") - require.True(t, balance.Amount.Equal(math.NewInt(800))) + // check if tracking ubd entry is updated accordingly + lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) + delLocking := lockupAccountInfoResponse.DelegatedLocking + require.True(t, delLocking.AmountOf("stake").Equal(math.ZeroInt())) + + // check if the entry is removed + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.Len(t, entries, 0) }) } diff --git a/tests/integration/accounts/lockup/periodic_lockup_test_suite.go b/tests/integration/accounts/lockup/periodic_lockup_test_suite.go index 3924012d52d6..ef3a0dcd6d57 100644 --- a/tests/integration/accounts/lockup/periodic_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/periodic_lockup_test_suite.go @@ -23,11 +23,11 @@ func (s *IntegrationTestSuite) TestPeriodicLockingAccount() { ctx := sdk.NewContext(app.CommitMultiStore(), false, app.Logger()).WithHeaderInfo(header.Info{ Time: currentTime, }) + s.setupStakingParams(ctx, app) ownerAddrStr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) require.NoError(t, err) s.fundAccount(app, ctx, accOwner, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000000))}) randAcc := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - withdrawAcc := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) _, accountAddr, err := app.AccountsKeeper.Init(ctx, lockupaccount.PERIODIC_LOCKING_ACCOUNT, accOwner, &types.MsgInitPeriodicLockingAccount{ Owner: ownerAddrStr, @@ -75,19 +75,6 @@ func (s *IntegrationTestSuite) TestPeriodicLockingAccount() { err := s.executeTx(ctx, msg, app, accountAddr, accOwner) require.NotNil(t, err) }) - t.Run("error - execute withdraw message, no withdrawable token", func(t *testing.T) { - ownerAddr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) - require.NoError(t, err) - withdrawAddr, err := app.AuthKeeper.AddressCodec().BytesToString(withdrawAcc) - require.NoError(t, err) - msg := &types.MsgWithdraw{ - Withdrawer: ownerAddr, - ToAddress: withdrawAddr, - Denoms: []string{"stake"}, - } - err = s.executeTx(ctx, msg, app, accountAddr, accOwner) - require.NotNil(t, err) - }) // Update context time // After first period 500stake should be unlock @@ -115,25 +102,6 @@ func (s *IntegrationTestSuite) TestPeriodicLockingAccount() { Time: currentTime.Add(time.Minute * 2), }) - t.Run("oke - execute withdraw message", func(t *testing.T) { - ownerAddr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) - require.NoError(t, err) - withdrawAddr, err := app.AuthKeeper.AddressCodec().BytesToString(withdrawAcc) - require.NoError(t, err) - msg := &types.MsgWithdraw{ - Withdrawer: ownerAddr, - ToAddress: withdrawAddr, - Denoms: []string{"stake"}, - } - err = s.executeTx(ctx, msg, app, accountAddr, accOwner) - require.NoError(t, err) - - // withdrawable amount should be - // 1000stake - 500stake( above sent amt ) = 500stake - balance := app.BankKeeper.GetBalance(ctx, withdrawAcc, "stake") - require.True(t, balance.Amount.Equal(math.NewInt(500))) - }) - t.Run("ok - execute delegate message", func(t *testing.T) { msg := &types.MsgDelegate{ Sender: ownerAddrStr, @@ -185,10 +153,11 @@ func (s *IntegrationTestSuite) TestPeriodicLockingAccount() { require.NoError(t, err) require.Equal(t, len(ubd.Entries), 1) - // check if tracking is updated accordingly - lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) - delLocking := lockupAccountInfoResponse.DelegatedLocking - require.True(t, delLocking.AmountOf("stake").Equal(math.ZeroInt())) + // check if an entry is added + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.True(t, entries[0].Amount.Amount.Equal(math.NewInt(100))) + require.True(t, entries[0].ValidatorAddress == val.OperatorAddress) }) // Update context time @@ -197,6 +166,10 @@ func (s *IntegrationTestSuite) TestPeriodicLockingAccount() { Time: currentTime.Add(time.Minute * 3), }) + // trigger endblock for staking to handle matured unbonding delegation + _, err = app.StakingKeeper.EndBlocker(ctx) + require.NoError(t, err) + t.Run("ok - execute delegate message", func(t *testing.T) { msg := &types.MsgDelegate{ Sender: ownerAddrStr, @@ -217,7 +190,15 @@ func (s *IntegrationTestSuite) TestPeriodicLockingAccount() { // check if tracking is updated accordingly lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) + // check if matured ubd entry cleared + delLocking := lockupAccountInfoResponse.DelegatedLocking + require.True(t, delLocking.AmountOf("stake").Equal(math.ZeroInt())) delFree := lockupAccountInfoResponse.DelegatedFree require.True(t, delFree.AmountOf("stake").Equal(math.NewInt(100))) + + // check if the entry is removed + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.Len(t, entries, 0) }) } diff --git a/tests/integration/accounts/lockup/permanent_lockup_test_suite.go b/tests/integration/accounts/lockup/permanent_lockup_test_suite.go index 1505dbac0c17..ca38f5629eb5 100644 --- a/tests/integration/accounts/lockup/permanent_lockup_test_suite.go +++ b/tests/integration/accounts/lockup/permanent_lockup_test_suite.go @@ -23,6 +23,7 @@ func (s *IntegrationTestSuite) TestPermanentLockingAccount() { ctx := sdk.NewContext(app.CommitMultiStore(), false, app.Logger()).WithHeaderInfo(header.Info{ Time: currentTime, }) + s.setupStakingParams(ctx, app) ownerAddrStr, err := app.AuthKeeper.AddressCodec().BytesToString(accOwner) require.NoError(t, err) s.fundAccount(app, ctx, accOwner, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000000))}) @@ -109,10 +110,11 @@ func (s *IntegrationTestSuite) TestPermanentLockingAccount() { require.NoError(t, err) require.Equal(t, len(ubd.Entries), 1) - // check if tracking is updated accordingly - lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) - delLocking := lockupAccountInfoResponse.DelegatedLocking - require.True(t, delLocking.AmountOf("stake").Equal(math.ZeroInt())) + // check if an entry is added + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.True(t, entries[0].Amount.Amount.Equal(math.NewInt(100))) + require.True(t, entries[0].ValidatorAddress == val.OperatorAddress) }) s.fundAccount(app, ctx, accountAddr, sdk.Coins{sdk.NewCoin("stake", math.NewInt(1000))}) @@ -129,4 +131,43 @@ func (s *IntegrationTestSuite) TestPermanentLockingAccount() { balance := app.BankKeeper.GetBalance(ctx, randAcc, "stake") require.True(t, balance.Amount.Equal(math.NewInt(100))) }) + + // Update context time + ctx = ctx.WithHeaderInfo(header.Info{ + Time: currentTime.Add(time.Second * 11), + }) + + // trigger endblock for staking to handle matured unbonding delegation + _, err = app.StakingKeeper.EndBlocker(ctx) + require.NoError(t, err) + + t.Run("ok - execute delegate message", func(t *testing.T) { + msg := &types.MsgDelegate{ + Sender: ownerAddrStr, + ValidatorAddress: val.OperatorAddress, + Amount: sdk.NewCoin("stake", math.NewInt(10)), + } + err = s.executeTx(ctx, msg, app, accountAddr, accOwner) + require.NoError(t, err) + + valbz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.OperatorAddress) + require.NoError(t, err) + + del, err := app.StakingKeeper.Delegations.Get( + ctx, collections.Join(sdk.AccAddress(accountAddr), sdk.ValAddress(valbz)), + ) + require.NoError(t, err) + require.NotNil(t, del) + + // check if tracking is updated accordingly + lockupAccountInfoResponse := s.queryLockupAccInfo(ctx, app, accountAddr) + delLocking := lockupAccountInfoResponse.DelegatedLocking + // matured ubd entry should be cleared so del locking should only be 10 + require.True(t, delLocking.AmountOf("stake").Equal(math.NewInt(10))) + + // check if the entry is removed + unbondingEntriesResponse := s.queryUnbondingEntries(ctx, app, accountAddr, val.OperatorAddress) + entries := unbondingEntriesResponse.UnbondingEntries + require.Len(t, entries, 0) + }) } diff --git a/tests/integration/accounts/lockup/utils.go b/tests/integration/accounts/lockup/utils.go index a0ce8f4e0c23..d92586f1ac90 100644 --- a/tests/integration/accounts/lockup/utils.go +++ b/tests/integration/accounts/lockup/utils.go @@ -2,6 +2,7 @@ package lockup import ( "testing" + "time" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -70,3 +71,27 @@ func (s *IntegrationTestSuite) queryLockupAccInfo(ctx sdk.Context, app *simapp.S return lockupAccountInfoResponse } + +func (s *IntegrationTestSuite) queryUnbondingEntries(ctx sdk.Context, app *simapp.SimApp, accAddr []byte, valAddr string) *types.QueryUnbondingEntriesResponse { + req := &types.QueryUnbondingEntriesRequest{ + ValidatorAddress: valAddr, + } + resp, err := s.queryAcc(ctx, req, app, accAddr) + require.NoError(s.T(), err) + require.NotNil(s.T(), resp) + + unbondingEntriesResponse, ok := resp.(*types.QueryUnbondingEntriesResponse) + require.True(s.T(), ok) + + return unbondingEntriesResponse +} + +func (s *IntegrationTestSuite) setupStakingParams(ctx sdk.Context, app *simapp.SimApp) { + params, err := app.StakingKeeper.Params.Get(ctx) + require.NoError(s.T(), err) + + // update unbonding time + params.UnbondingTime = time.Duration(time.Second * 10) + err = app.StakingKeeper.Params.Set(ctx, params) + require.NoError(s.T(), err) +} diff --git a/x/accounts/defaults/lockup/continuous_locking_account.go b/x/accounts/defaults/lockup/continuous_locking_account.go index 4cf4600eb3d3..abe22f649270 100644 --- a/x/accounts/defaults/lockup/continuous_locking_account.go +++ b/x/accounts/defaults/lockup/continuous_locking_account.go @@ -72,12 +72,6 @@ func (cva *ContinuousLockingAccount) SendCoins(ctx context.Context, msg *lockupt return cva.BaseLockup.SendCoins(ctx, msg, cva.GetLockedCoinsWithDenoms) } -func (cva *ContinuousLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) ( - *lockuptypes.MsgWithdrawResponse, error, -) { - return cva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, cva.GetLockedCoinsWithDenoms) -} - // GetLockCoinsInfo returns the total number of unlocked and locked coins. func (cva ContinuousLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (unlockedCoins, lockedCoins sdk.Coins, err error) { unlockedCoins = sdk.Coins{} @@ -186,6 +180,23 @@ func (cva ContinuousLockingAccount) QueryLockupAccountInfo(ctx context.Context, return resp, nil } +func (cva ContinuousLockingAccount) QuerySpendableTokens(ctx context.Context, req *lockuptypes.QuerySpendableAmountRequest) ( + *lockuptypes.QuerySpendableAmountResponse, error, +) { + hs := cva.headerService.HeaderInfo(ctx) + _, lockedCoins, err := cva.GetLockCoinsInfo(ctx, hs.Time) + if err != nil { + return nil, err + } + + resp, err := cva.BaseLockup.QuerySpendableTokens(ctx, lockedCoins) + if err != nil { + return nil, err + } + + return resp, nil +} + // Implement smart account interface func (cva ContinuousLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { accountstd.RegisterInitHandler(builder, cva.Init) @@ -194,10 +205,11 @@ func (cva ContinuousLockingAccount) RegisterInitHandler(builder *accountstd.Init func (cva ContinuousLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { accountstd.RegisterExecuteHandler(builder, cva.Delegate) accountstd.RegisterExecuteHandler(builder, cva.SendCoins) - accountstd.RegisterExecuteHandler(builder, cva.WithdrawUnlockedCoins) cva.BaseLockup.RegisterExecuteHandlers(builder) } func (cva ContinuousLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { accountstd.RegisterQueryHandler(builder, cva.QueryLockupAccountInfo) + accountstd.RegisterQueryHandler(builder, cva.QuerySpendableTokens) + cva.BaseLockup.RegisterQueryHandlers(builder) } diff --git a/x/accounts/defaults/lockup/continuous_locking_account_test.go b/x/accounts/defaults/lockup/continuous_locking_account_test.go index 475d38fceaaf..097c335db57d 100644 --- a/x/accounts/defaults/lockup/continuous_locking_account_test.go +++ b/x/accounts/defaults/lockup/continuous_locking_account_test.go @@ -102,48 +102,21 @@ func TestContinuousAccountUndelegate(t *testing.T) { }) require.NoError(t, err) - delLocking, err = acc.DelegatedLocking.Get(ctx, "test") + entries, err := acc.UnbondEntries.Get(sdkCtx, "val_address") require.NoError(t, err) - require.True(t, delLocking.Equal(math.ZeroInt())) - - startTime, err := acc.StartTime.Get(sdkCtx) - require.NoError(t, err) - - // Update context time to unlocked half of the original locking amount - sdkCtx = sdkCtx.WithHeaderInfo(header.Info{ - Time: startTime.Add(time.Minute * 1), - }) + require.Len(t, entries.Entries, 1) + require.True(t, entries.Entries[0].Amount.Amount.Equal(math.NewInt(1))) + require.True(t, entries.Entries[0].ValidatorAddress == "val_address") - _, err = acc.Delegate(sdkCtx, &lockuptypes.MsgDelegate{ - Sender: "owner", - ValidatorAddress: "val_address", - Amount: sdk.NewCoin("test", math.NewInt(6)), - }) + err = acc.checkUnbondingEntriesMature(sdkCtx) require.NoError(t, err) - delLocking, err = acc.DelegatedLocking.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delLocking.Equal(math.NewInt(5))) - - delFree, err := acc.DelegatedFree.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delFree.Equal(math.NewInt(1))) - - // Undelegate - _, err = acc.Undelegate(sdkCtx, &lockuptypes.MsgUndelegate{ - Sender: "owner", - ValidatorAddress: "val_address", - Amount: sdk.NewCoin("test", math.NewInt(4)), - }) - require.NoError(t, err) + _, err = acc.UnbondEntries.Get(sdkCtx, "val_address") + require.Error(t, err) delLocking, err = acc.DelegatedLocking.Get(ctx, "test") require.NoError(t, err) - require.True(t, delLocking.Equal(math.NewInt(2))) - - delFree, err = acc.DelegatedFree.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delFree.Equal(math.ZeroInt())) + require.True(t, delLocking.Equal(math.ZeroInt())) } func TestContinuousAccountSendCoins(t *testing.T) { @@ -176,37 +149,7 @@ func TestContinuousAccountSendCoins(t *testing.T) { require.NoError(t, err) } -func TestContinuousAccountWithdrawUnlockedCoins(t *testing.T) { - ctx, ss := newMockContext(t) - sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ - Time: time.Now(), - }) - - acc := setupContinuousAccount(t, sdkCtx, ss) - _, err := acc.WithdrawUnlockedCoins(sdkCtx, &lockuptypes.MsgWithdraw{ - Withdrawer: "owner", - ToAddress: "receiver", - Denoms: []string{"test"}, - }) - require.Error(t, err) - - startTime, err := acc.StartTime.Get(sdkCtx) - require.NoError(t, err) - - // Update context time to unlocked half of the original locking amount - sdkCtx = sdkCtx.WithHeaderInfo(header.Info{ - Time: startTime.Add(time.Minute * 1), - }) - - _, err = acc.WithdrawUnlockedCoins(sdkCtx, &lockuptypes.MsgWithdraw{ - Withdrawer: "owner", - ToAddress: "receiver", - Denoms: []string{"test"}, - }) - require.NoError(t, err) -} - -func TestContinuousAccountGetLockCoinInfo(t *testing.T) { +func TestContinousAccountGetLockCoinInfo(t *testing.T) { ctx, ss := newMockContext(t) sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ Time: time.Now(), diff --git a/x/accounts/defaults/lockup/delayed_locking_account.go b/x/accounts/defaults/lockup/delayed_locking_account.go index cf078be95739..22d00b3dc502 100644 --- a/x/accounts/defaults/lockup/delayed_locking_account.go +++ b/x/accounts/defaults/lockup/delayed_locking_account.go @@ -49,12 +49,6 @@ func (dva *DelayedLockingAccount) SendCoins(ctx context.Context, msg *lockuptype return dva.BaseLockup.SendCoins(ctx, msg, dva.GetLockedCoinsWithDenoms) } -func (dva *DelayedLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) ( - *lockuptypes.MsgWithdrawResponse, error, -) { - return dva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, dva.GetLockedCoinsWithDenoms) -} - // GetLockCoinsInfo returns the total number of unlocked and locked coins. func (dva DelayedLockingAccount) GetLockCoinsInfo(ctx context.Context, blockTime time.Time) (sdk.Coins, sdk.Coins, error) { endTime, err := dva.EndTime.Get(ctx) @@ -135,6 +129,23 @@ func (dva DelayedLockingAccount) QueryVestingAccountInfo(ctx context.Context, re return resp, nil } +func (dva DelayedLockingAccount) QuerySpendableTokens(ctx context.Context, req *lockuptypes.QuerySpendableAmountRequest) ( + *lockuptypes.QuerySpendableAmountResponse, error, +) { + hs := dva.headerService.HeaderInfo(ctx) + _, lockedCoins, err := dva.GetLockCoinsInfo(ctx, hs.Time) + if err != nil { + return nil, err + } + + resp, err := dva.BaseLockup.QuerySpendableTokens(ctx, lockedCoins) + if err != nil { + return nil, err + } + + return resp, nil +} + // Implement smart account interface func (dva DelayedLockingAccount) RegisterInitHandler(builder *accountstd.InitBuilder) { accountstd.RegisterInitHandler(builder, dva.Init) @@ -143,10 +154,11 @@ func (dva DelayedLockingAccount) RegisterInitHandler(builder *accountstd.InitBui func (dva DelayedLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { accountstd.RegisterExecuteHandler(builder, dva.Delegate) accountstd.RegisterExecuteHandler(builder, dva.SendCoins) - accountstd.RegisterExecuteHandler(builder, dva.WithdrawUnlockedCoins) dva.BaseLockup.RegisterExecuteHandlers(builder) } func (dva DelayedLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { accountstd.RegisterQueryHandler(builder, dva.QueryVestingAccountInfo) + accountstd.RegisterQueryHandler(builder, dva.QuerySpendableTokens) + dva.BaseLockup.RegisterQueryHandlers(builder) } diff --git a/x/accounts/defaults/lockup/delayed_locking_account_test.go b/x/accounts/defaults/lockup/delayed_locking_account_test.go index 5bb722168f24..dc3235c7a6ba 100644 --- a/x/accounts/defaults/lockup/delayed_locking_account_test.go +++ b/x/accounts/defaults/lockup/delayed_locking_account_test.go @@ -101,44 +101,21 @@ func TestDelayedAccountUndelegate(t *testing.T) { }) require.NoError(t, err) - delLocking, err = acc.DelegatedLocking.Get(ctx, "test") + entries, err := acc.UnbondEntries.Get(sdkCtx, "val_address") require.NoError(t, err) - require.True(t, delLocking.Equal(math.ZeroInt())) + require.Len(t, entries.Entries, 1) + require.True(t, entries.Entries[0].Amount.Amount.Equal(math.NewInt(1))) + require.True(t, entries.Entries[0].ValidatorAddress == "val_address") - endTime, err := acc.EndTime.Get(sdkCtx) + err = acc.checkUnbondingEntriesMature(sdkCtx) require.NoError(t, err) - // Update context time to unlocked all the original locking amount - sdkCtx = sdkCtx.WithHeaderInfo(header.Info{ - Time: endTime.Add(time.Second), - }) - - _, err = acc.Delegate(sdkCtx, &lockuptypes.MsgDelegate{ - Sender: "owner", - ValidatorAddress: "val_address", - Amount: sdk.NewCoin("test", math.NewInt(6)), - }) - require.NoError(t, err) + _, err = acc.UnbondEntries.Get(sdkCtx, "val_address") + require.Error(t, err) delLocking, err = acc.DelegatedLocking.Get(ctx, "test") require.NoError(t, err) require.True(t, delLocking.Equal(math.ZeroInt())) - - delFree, err := acc.DelegatedFree.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delFree.Equal(math.NewInt(6))) - - // Undelegate - _, err = acc.Undelegate(sdkCtx, &lockuptypes.MsgUndelegate{ - Sender: "owner", - ValidatorAddress: "val_address", - Amount: sdk.NewCoin("test", math.NewInt(4)), - }) - require.NoError(t, err) - - delFree, err = acc.DelegatedFree.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delFree.Equal(math.NewInt(2))) } func TestDelayedAccountSendCoins(t *testing.T) { @@ -171,36 +148,6 @@ func TestDelayedAccountSendCoins(t *testing.T) { require.NoError(t, err) } -func TestDelayedAccountWithdrawUnlockedCoins(t *testing.T) { - ctx, ss := newMockContext(t) - sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ - Time: time.Now(), - }) - - acc := setupDelayedAccount(t, sdkCtx, ss) - _, err := acc.WithdrawUnlockedCoins(sdkCtx, &lockuptypes.MsgWithdraw{ - Withdrawer: "owner", - ToAddress: "receiver", - Denoms: []string{"test"}, - }) - require.Error(t, err) - - endTime, err := acc.EndTime.Get(sdkCtx) - require.NoError(t, err) - - // Update context time to unlocked all the original locking amount - sdkCtx = sdkCtx.WithHeaderInfo(header.Info{ - Time: endTime.Add(time.Second), - }) - - _, err = acc.WithdrawUnlockedCoins(sdkCtx, &lockuptypes.MsgWithdraw{ - Withdrawer: "owner", - ToAddress: "receiver", - Denoms: []string{"test"}, - }) - require.NoError(t, err) -} - func TestDelayedAccountGetLockCoinInfo(t *testing.T) { ctx, ss := newMockContext(t) sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ diff --git a/x/accounts/defaults/lockup/lockup.go b/x/accounts/defaults/lockup/lockup.go index aecdfd29b265..a1582bf5c625 100644 --- a/x/accounts/defaults/lockup/lockup.go +++ b/x/accounts/defaults/lockup/lockup.go @@ -4,8 +4,6 @@ import ( "bytes" "context" "errors" - "maps" - "slices" "time" "github.com/cosmos/gogoproto/proto" @@ -22,6 +20,7 @@ import ( distrtypes "cosmossdk.io/x/distribution/types" stakingtypes "cosmossdk.io/x/staking/types" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -35,7 +34,7 @@ var ( StartTimePrefix = collections.NewPrefix(4) LockingPeriodsPrefix = collections.NewPrefix(5) OwnerPrefix = collections.NewPrefix(6) - WithdrawedCoinsPrefix = collections.NewPrefix(7) + UnbondEntriesPrefix = collections.NewPrefix(7) ) var ( @@ -54,7 +53,7 @@ func newBaseLockup(d accountstd.Dependencies) *BaseLockup { OriginalLocking: collections.NewMap(d.SchemaBuilder, OriginalLockingPrefix, "original_locking", collections.StringKey, sdk.IntValue), DelegatedFree: collections.NewMap(d.SchemaBuilder, DelegatedFreePrefix, "delegated_free", collections.StringKey, sdk.IntValue), DelegatedLocking: collections.NewMap(d.SchemaBuilder, DelegatedLockingPrefix, "delegated_locking", collections.StringKey, sdk.IntValue), - WithdrawedCoins: collections.NewMap(d.SchemaBuilder, WithdrawedCoinsPrefix, "withdrawed_coins", collections.StringKey, sdk.IntValue), + UnbondEntries: collections.NewMap(d.SchemaBuilder, UnbondEntriesPrefix, "unbond_entries", collections.StringKey, codec.CollValue[lockuptypes.UnbondingEntries](d.LegacyStateCodec)), addressCodec: d.AddressCodec, headerService: d.Environment.HeaderService, EndTime: collections.NewItem(d.SchemaBuilder, EndTimePrefix, "end_time", collcodec.KeyToValueCodec[time.Time](sdk.TimeKey)), @@ -69,9 +68,10 @@ type BaseLockup struct { OriginalLocking collections.Map[string, math.Int] DelegatedFree collections.Map[string, math.Int] DelegatedLocking collections.Map[string, math.Int] - WithdrawedCoins collections.Map[string, math.Int] - addressCodec address.Codec - headerService header.Service + // map val address to unbonding entries + UnbondEntries collections.Map[string, lockuptypes.UnbondingEntries] + addressCodec address.Codec + headerService header.Service // lockup end time. EndTime collections.Item[time.Time] } @@ -96,12 +96,6 @@ func (bva *BaseLockup) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupA if err != nil { return nil, err } - - // Set initial value for all locked token - err = bva.WithdrawedCoins.Set(ctx, coin.Denom, math.ZeroInt()) - if err != nil { - return nil, err - } } bondDenom, err := getStakingDenom(ctx) @@ -155,6 +149,12 @@ func (bva *BaseLockup) Delegate( return nil, err } + // refresh ubd entries to make sure delegation locking amount is up to date + err = bva.checkUnbondingEntriesMature(ctx) + if err != nil { + return nil, err + } + err = bva.TrackDelegation( ctx, sdk.Coins{*balance}, @@ -193,11 +193,6 @@ func (bva *BaseLockup) Undelegate( return nil, err } - err = bva.TrackUndelegation(ctx, sdk.Coins{msg.Amount}) - if err != nil { - return nil, err - } - msgUndelegate := &stakingtypes.MsgUndelegate{ DelegatorAddress: delegatorAddress, ValidatorAddress: msg.ValidatorAddress, @@ -208,6 +203,50 @@ func (bva *BaseLockup) Undelegate( return nil, err } + header := bva.headerService.HeaderInfo(ctx) + + msgUndelegateResp, err := accountstd.UnpackAny[stakingtypes.MsgUndelegateResponse](resp[0]) + if err != nil { + return nil, err + } + + isNewEntry := true + entries, err := bva.UnbondEntries.Get(ctx, msg.ValidatorAddress) + if err != nil { + if errorsmod.IsOf(err, collections.ErrNotFound) { + entries = lockuptypes.UnbondingEntries{ + Entries: []*lockuptypes.UnbondingEntry{}, + } + } else { + return nil, err + } + } + + for i, entry := range entries.Entries { + if entry.CreationHeight == header.Height && entry.EndTime.Equal(msgUndelegateResp.CompletionTime) { + entry.Amount = entry.Amount.Add(msg.Amount) + + // update the entry + entries.Entries[i] = entry + isNewEntry = false + break + } + } + + if isNewEntry { + entries.Entries = append(entries.Entries, &lockuptypes.UnbondingEntry{ + EndTime: msgUndelegateResp.CompletionTime, + Amount: msgUndelegateResp.Amount, + ValidatorAddress: msg.ValidatorAddress, + CreationHeight: header.Height, + }) + } + + err = bva.UnbondEntries.Set(ctx, msg.ValidatorAddress, entries) + if err != nil { + return nil, err + } + return &lockuptypes.MsgExecuteMessagesResponse{Responses: resp}, nil } @@ -282,105 +321,6 @@ func (bva *BaseLockup) SendCoins( return &lockuptypes.MsgExecuteMessagesResponse{Responses: resp}, nil } -// WithdrawUnlockedCoins allow owner to withdraw the unlocked token for a specific denoms to an -// account of choice. Update the withdrawed token tracking for lockup account -func (bva *BaseLockup) WithdrawUnlockedCoins( - ctx context.Context, msg *lockuptypes.MsgWithdraw, getLockedCoinsFunc getLockedCoinsFunc, -) ( - *lockuptypes.MsgWithdrawResponse, error, -) { - err := bva.checkSender(ctx, msg.Withdrawer) - if err != nil { - return nil, err - } - whoami := accountstd.Whoami(ctx) - fromAddress, err := bva.addressCodec.BytesToString(whoami) - if err != nil { - return nil, err - } - - // deduplicate the denoms - denoms := make(map[string]struct{}) - for _, denom := range msg.Denoms { - denoms[denom] = struct{}{} - } - uniqueDenoms := slices.Collect(maps.Keys(denoms)) - - hs := bva.headerService.HeaderInfo(ctx) - lockedCoins, err := getLockedCoinsFunc(ctx, hs.Time, uniqueDenoms...) - if err != nil { - return nil, err - } - - amount := sdk.Coins{} - for _, denom := range uniqueDenoms { - balance, err := bva.getBalance(ctx, fromAddress, denom) - if err != nil { - return nil, err - } - lockedAmt := lockedCoins.AmountOf(denom) - - // get lockedCoin from that are not bonded for the sent denom - notBondedLockedCoin, err := bva.GetNotBondedLockedCoin(ctx, sdk.NewCoin(denom, lockedAmt), denom) - if err != nil { - return nil, err - } - - spendable, err := balance.SafeSub(notBondedLockedCoin) - if err != nil { - return nil, errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, - "locked amount exceeds account balance funds: %s > %s", notBondedLockedCoin, balance) - } - - withdrawedAmt, err := bva.WithdrawedCoins.Get(ctx, denom) - if err != nil { - return nil, err - } - originalLockingAmt, err := bva.OriginalLocking.Get(ctx, denom) - if err != nil { - return nil, err - } - - // withdrawable amount is equal to original locking amount subtract already withdrawed amount - withdrawableAmt, err := originalLockingAmt.SafeSub(withdrawedAmt) - if err != nil { - return nil, err - } - - withdrawAmt := math.MinInt(withdrawableAmt, spendable.Amount) - // if zero amount go to the next iteration - if withdrawAmt.IsZero() { - continue - } - amount = append(amount, sdk.NewCoin(denom, withdrawAmt)) - - // update the withdrawed amount - err = bva.WithdrawedCoins.Set(ctx, denom, withdrawedAmt.Add(withdrawAmt)) - if err != nil { - return nil, err - } - } - if len(amount) == 0 { - return nil, errors.New("no tokens available for withdrawing") - } - - msgSend := &banktypes.MsgSend{ - FromAddress: fromAddress, - ToAddress: msg.ToAddress, - Amount: amount, - } - - _, err = sendMessage(ctx, msgSend) - if err != nil { - return nil, err - } - - return &lockuptypes.MsgWithdrawResponse{ - Receiver: msg.ToAddress, - AmountReceived: amount, - }, nil -} - func (bva *BaseLockup) checkSender(ctx context.Context, sender string) error { owner, err := bva.Owner.Get(ctx) if err != nil { @@ -416,6 +356,77 @@ func getStakingDenom(ctx context.Context) (string, error) { return resp.Params.BondDenom, nil } +// checkUnbondingEntriesMature iterates through all the unbonding entries and check if any of the entries are matured and handled. +func (bva *BaseLockup) checkUnbondingEntriesMature(ctx context.Context) error { + whoami := accountstd.Whoami(ctx) + delAddr, err := bva.addressCodec.BytesToString(whoami) + if err != nil { + return err + } + + currentTime := bva.headerService.HeaderInfo(ctx).Time + + removeKeys := []string{} + err = bva.UnbondEntries.Walk(ctx, nil, func(key string, value lockuptypes.UnbondingEntries) (stop bool, err error) { + for i := 0; i < len(value.Entries); i++ { + entry := value.Entries[i] + // if not mature then skip + if entry.EndTime.After(currentTime) { + return false, nil + } + + stakingUnbonding, err := bva.getUnbondingEntries(ctx, delAddr, key) + if err != nil { + // if ubd delegation is empty then skip the next iteration check + if !errorsmod.IsOf(err, stakingtypes.ErrNoUnbondingDelegation) { + return true, err + } + + } + + found := false + // check if the entry is still exist in the unbonding entries + for _, e := range stakingUnbonding { + if e.CompletionTime.Equal(entry.EndTime) && entry.CreationHeight == entry.CreationHeight { + found = true + break + } + } + + // if not found or ubd delegation is empty then assume ubd entry is being handled + if !found { + err = bva.TrackUndelegation(ctx, sdk.NewCoins(entry.Amount)) + if err != nil { + return true, err + } + + // remove entry + value.Entries = append(value.Entries[:i], value.Entries[i+1:]...) + i-- + } + } + + if len(value.Entries) == 0 { + removeKeys = append(removeKeys, key) + } else { + err = bva.UnbondEntries.Set(ctx, key, value) + if err != nil { + return true, err + } + } + + return false, nil + }) + + for _, key := range removeKeys { + err = bva.UnbondEntries.Remove(ctx, key) + if err != nil { + return err + } + } + return err +} + // TrackDelegation tracks a delegation amount for any given lockup account type // given the amount of coins currently being locked and the current account balance // of the delegation denominations. @@ -546,6 +557,17 @@ func (bva BaseLockup) getBalance(ctx context.Context, sender, denom string) (*sd return resp.Balance, nil } +func (bva BaseLockup) getUnbondingEntries(ctx context.Context, delAddr, valAddr string) ([]stakingtypes.UnbondingDelegationEntry, error) { + resp, err := accountstd.QueryModule[*stakingtypes.QueryUnbondingDelegationResponse]( + ctx, &stakingtypes.QueryUnbondingDelegationRequest{DelegatorAddr: delAddr, ValidatorAddr: valAddr}, + ) + if err != nil { + return nil, err + } + + return resp.Unbond.Entries, nil +} + func (bva BaseLockup) checkTokensSendable(ctx context.Context, sender string, amount, lockedCoins sdk.Coins) error { // Check if any sent tokens is exceeds lockup account balances for _, coin := range amount { @@ -597,6 +619,12 @@ func (bva BaseLockup) IterateCoinEntries( // GetNotBondedLockedCoin returns the coin that are not spendable that are not bonded by denom // for a lockup account. If the coin by the provided denom are not locked, an coin with zero amount is returned. func (bva BaseLockup) GetNotBondedLockedCoin(ctx context.Context, lockedCoin sdk.Coin, denom string) (sdk.Coin, error) { + // refresh the unbonding entries + err := bva.checkUnbondingEntriesMature(ctx) + if err != nil { + return sdk.Coin{}, err + } + bondDenom, err := getStakingDenom(ctx) if err != nil { return sdk.Coin{}, err @@ -672,7 +700,67 @@ func (bva BaseLockup) QueryLockupAccountBaseInfo(ctx context.Context, _ *lockupt }, nil } +func (bva BaseLockup) QueryUnbondingEntries(ctx context.Context, req *lockuptypes.QueryUnbondingEntriesRequest) ( + *lockuptypes.QueryUnbondingEntriesResponse, error, +) { + entries, err := bva.UnbondEntries.Get(ctx, req.ValidatorAddress) + if err != nil { + if !errorsmod.IsOf(err, collections.ErrNotFound) { + return nil, err + } + + entries = lockuptypes.UnbondingEntries{ + Entries: []*lockuptypes.UnbondingEntry{}, + } + } + + return &lockuptypes.QueryUnbondingEntriesResponse{ + UnbondingEntries: entries.Entries, + }, nil +} + +func (bva BaseLockup) QuerySpendableTokens(ctx context.Context, lockedCoins sdk.Coins) ( + *lockuptypes.QuerySpendableAmountResponse, error, +) { + whoami := accountstd.Whoami(ctx) + accAddr, err := bva.addressCodec.BytesToString(whoami) + if err != nil { + return nil, err + } + + spendables := sdk.Coins{} + for _, denom := range lockedCoins.Denoms() { + balance, err := bva.getBalance(ctx, accAddr, denom) + if err != nil { + return nil, err + } + + lockedAmt := lockedCoins.AmountOf(balance.Denom) + + // get lockedCoin from that are not bonded for the sent denom + notBondedLockedCoin, err := bva.GetNotBondedLockedCoin(ctx, sdk.NewCoin(balance.Denom, lockedAmt), balance.Denom) + if err != nil { + return nil, err + } + + spendable, hasNeg := sdk.Coins{*balance}.SafeSub(notBondedLockedCoin) + if hasNeg { + spendable = sdk.Coins{sdk.NewCoin(balance.Denom, math.ZeroInt())} + } + + spendables = spendables.Add(spendable...) + } + + return &lockuptypes.QuerySpendableAmountResponse{ + SpendableTokens: spendables, + }, nil +} + func (bva BaseLockup) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { accountstd.RegisterExecuteHandler(builder, bva.Undelegate) accountstd.RegisterExecuteHandler(builder, bva.WithdrawReward) } + +func (bva BaseLockup) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { + accountstd.RegisterQueryHandler(builder, bva.QueryUnbondingEntries) +} diff --git a/x/accounts/defaults/lockup/lockup_test.go b/x/accounts/defaults/lockup/lockup_test.go index 3a704d791796..0748a17e8caf 100644 --- a/x/accounts/defaults/lockup/lockup_test.go +++ b/x/accounts/defaults/lockup/lockup_test.go @@ -7,7 +7,9 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/core/header" "cosmossdk.io/core/store" + "cosmossdk.io/log" "cosmossdk.io/math" lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1" @@ -229,6 +231,9 @@ func TestTrackingUnDelegation(t *testing.T) { func TestGetNotBondedLockedCoin(t *testing.T) { ctx, ss := newMockContext(t) + sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ + Time: time.Now(), + }) testcases := []struct { name string @@ -257,10 +262,10 @@ func TestGetNotBondedLockedCoin(t *testing.T) { } for _, test := range testcases { - baseLockup := setup(t, ctx, ss) - test.malaete(ctx, baseLockup) + baseLockup := setup(t, sdkCtx, ss) + test.malaete(sdkCtx, baseLockup) - lockedCoin, err := baseLockup.GetNotBondedLockedCoin(ctx, test.lockedCoin, "test") + lockedCoin, err := baseLockup.GetNotBondedLockedCoin(sdkCtx, test.lockedCoin, "test") require.NoError(t, err) require.True(t, test.expLockCoin.Equal(lockedCoin), test.name+" locked amount must be equal") diff --git a/x/accounts/defaults/lockup/periodic_locking_account.go b/x/accounts/defaults/lockup/periodic_locking_account.go index 61f7190f635d..6e2caba7e6cf 100644 --- a/x/accounts/defaults/lockup/periodic_locking_account.go +++ b/x/accounts/defaults/lockup/periodic_locking_account.go @@ -81,12 +81,6 @@ func (pva PeriodicLockingAccount) Init(ctx context.Context, msg *lockuptypes.Msg if err != nil { return nil, err } - - // Set initial value for all withdrawed token - err = pva.WithdrawedCoins.Set(ctx, coin.Denom, math.ZeroInt()) - if err != nil { - return nil, err - } } bondDenom, err := getStakingDenom(ctx) @@ -134,12 +128,6 @@ func (pva *PeriodicLockingAccount) SendCoins(ctx context.Context, msg *lockuptyp return pva.BaseLockup.SendCoins(ctx, msg, pva.GetLockedCoinsWithDenoms) } -func (pva *PeriodicLockingAccount) WithdrawUnlockedCoins(ctx context.Context, msg *lockuptypes.MsgWithdraw) ( - *lockuptypes.MsgWithdrawResponse, error, -) { - return pva.BaseLockup.WithdrawUnlockedCoins(ctx, msg, pva.GetLockedCoinsWithDenoms) -} - // IteratePeriods iterates over all the Periods entries. func (pva PeriodicLockingAccount) IteratePeriods( ctx context.Context, @@ -336,11 +324,11 @@ func (pva PeriodicLockingAccount) RegisterInitHandler(builder *accountstd.InitBu func (pva PeriodicLockingAccount) RegisterExecuteHandlers(builder *accountstd.ExecuteBuilder) { accountstd.RegisterExecuteHandler(builder, pva.Delegate) accountstd.RegisterExecuteHandler(builder, pva.SendCoins) - accountstd.RegisterExecuteHandler(builder, pva.WithdrawUnlockedCoins) pva.BaseLockup.RegisterExecuteHandlers(builder) } func (pva PeriodicLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { accountstd.RegisterQueryHandler(builder, pva.QueryLockupAccountInfo) accountstd.RegisterQueryHandler(builder, pva.QueryLockingPeriods) + pva.BaseLockup.RegisterQueryHandlers(builder) } diff --git a/x/accounts/defaults/lockup/periodic_locking_account_test.go b/x/accounts/defaults/lockup/periodic_locking_account_test.go index 52478cea076f..bff11684e7f3 100644 --- a/x/accounts/defaults/lockup/periodic_locking_account_test.go +++ b/x/accounts/defaults/lockup/periodic_locking_account_test.go @@ -135,48 +135,22 @@ func TestPeriodicAccountUndelegate(t *testing.T) { }) require.NoError(t, err) - delLocking, err = acc.DelegatedLocking.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delLocking.Equal(math.ZeroInt())) - - startTime, err := acc.StartTime.Get(sdkCtx) - require.NoError(t, err) - - // Update context time to unlocked first period token - sdkCtx = sdkCtx.WithHeaderInfo(header.Info{ - Time: startTime.Add(time.Minute * 1), - }) - - _, err = acc.Delegate(sdkCtx, &lockuptypes.MsgDelegate{ - Sender: "owner", - ValidatorAddress: "val_address", - Amount: sdk.NewCoin("test", math.NewInt(6)), - }) + // sequence should be the previous one + entries, err := acc.UnbondEntries.Get(sdkCtx, "val_address") require.NoError(t, err) + require.Len(t, entries.Entries, 1) + require.True(t, entries.Entries[0].Amount.Amount.Equal(math.NewInt(1))) + require.True(t, entries.Entries[0].ValidatorAddress == "val_address") - delLocking, err = acc.DelegatedLocking.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delLocking.Equal(math.NewInt(5))) - - delFree, err := acc.DelegatedFree.Get(ctx, "test") + err = acc.checkUnbondingEntriesMature(sdkCtx) require.NoError(t, err) - require.True(t, delFree.Equal(math.NewInt(1))) - // Undelegate - _, err = acc.Undelegate(sdkCtx, &lockuptypes.MsgUndelegate{ - Sender: "owner", - ValidatorAddress: "val_address", - Amount: sdk.NewCoin("test", math.NewInt(4)), - }) - require.NoError(t, err) + _, err = acc.UnbondEntries.Get(sdkCtx, "val_address") + require.Error(t, err) delLocking, err = acc.DelegatedLocking.Get(ctx, "test") require.NoError(t, err) - require.True(t, delLocking.Equal(math.NewInt(2))) - - delFree, err = acc.DelegatedFree.Get(ctx, "test") - require.NoError(t, err) - require.True(t, delFree.Equal(math.ZeroInt())) + require.True(t, delLocking.Equal(math.ZeroInt())) } func TestPeriodicAccountSendCoins(t *testing.T) { @@ -209,40 +183,6 @@ func TestPeriodicAccountSendCoins(t *testing.T) { require.NoError(t, err) } -func TestPeriodicAccountWithdrawUnlockedCoins(t *testing.T) { - ctx, ss := newMockContext(t) - sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ - Time: time.Now(), - }) - - acc := setupPeriodicAccount(t, sdkCtx, ss) - _, err := acc.WithdrawUnlockedCoins(sdkCtx, &lockuptypes.MsgWithdraw{ - Withdrawer: "owner", - ToAddress: "receiver", - Denoms: []string{"test"}, - }) - require.Error(t, err) - - startTime, err := acc.StartTime.Get(sdkCtx) - require.NoError(t, err) - - // Update context time to unlocked first period token - sdkCtx = sdkCtx.WithHeaderInfo(header.Info{ - Time: startTime.Add(time.Minute * 1), - }) - - // withdraw unlocked token - resp, err := acc.WithdrawUnlockedCoins(sdkCtx, &lockuptypes.MsgWithdraw{ - Withdrawer: "owner", - ToAddress: "receiver", - Denoms: []string{"test", "test"}, // duplicate tokens should be ignored - }) - require.NoError(t, err) - require.Equal(t, resp.AmountReceived.Len(), 1) - require.Equal(t, resp.AmountReceived, sdk.NewCoins(sdk.NewCoin("test", math.NewInt(5)))) - require.Equal(t, resp.Receiver, "receiver") -} - func TestPeriodicAccountGetLockCoinInfo(t *testing.T) { ctx, ss := newMockContext(t) sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ diff --git a/x/accounts/defaults/lockup/permanent_locking_account.go b/x/accounts/defaults/lockup/permanent_locking_account.go index 8c1d633215e3..ee0d0a447a95 100644 --- a/x/accounts/defaults/lockup/permanent_locking_account.go +++ b/x/accounts/defaults/lockup/permanent_locking_account.go @@ -107,4 +107,5 @@ func (plva PermanentLockingAccount) RegisterExecuteHandlers(builder *accountstd. func (plva PermanentLockingAccount) RegisterQueryHandlers(builder *accountstd.QueryBuilder) { accountstd.RegisterQueryHandler(builder, plva.QueryLockupAccountInfo) + plva.BaseLockup.RegisterQueryHandlers(builder) } diff --git a/x/accounts/defaults/lockup/permanent_locking_account_test.go b/x/accounts/defaults/lockup/permanent_locking_account_test.go index ce0fd54fee04..224bfbb83e0a 100644 --- a/x/accounts/defaults/lockup/permanent_locking_account_test.go +++ b/x/accounts/defaults/lockup/permanent_locking_account_test.go @@ -77,6 +77,19 @@ func TestPermanentAccountUndelegate(t *testing.T) { }) require.NoError(t, err) + // sequence should be the previous one + entries, err := acc.UnbondEntries.Get(sdkCtx, "val_address") + require.NoError(t, err) + require.Len(t, entries.Entries, 1) + require.True(t, entries.Entries[0].Amount.Amount.Equal(math.NewInt(1))) + require.True(t, entries.Entries[0].ValidatorAddress == "val_address") + + err = acc.checkUnbondingEntriesMature(sdkCtx) + require.NoError(t, err) + + _, err = acc.UnbondEntries.Get(sdkCtx, "val_address") + require.Error(t, err) + delLocking, err = acc.DelegatedLocking.Get(ctx, "test") require.NoError(t, err) require.True(t, delLocking.Equal(math.ZeroInt())) diff --git a/x/accounts/defaults/lockup/utils_test.go b/x/accounts/defaults/lockup/utils_test.go index 6d5ce14af7ed..684e43b79bd3 100644 --- a/x/accounts/defaults/lockup/utils_test.go +++ b/x/accounts/defaults/lockup/utils_test.go @@ -4,9 +4,9 @@ import ( "context" "errors" "testing" + "time" gogoproto "github.com/cosmos/gogoproto/proto" - "github.com/stretchr/testify/require" "cosmossdk.io/collections" appmodulev2 "cosmossdk.io/core/appmodule/v2" @@ -77,7 +77,9 @@ func newMockContext(t *testing.T) (context.Context, store.KVStoreService) { case "/cosmos.staking.v1beta1.MsgDelegate": return &stakingtypes.MsgDelegateResponse{}, nil case "/cosmos.staking.v1beta1.MsgUndelegate": - return &stakingtypes.MsgUndelegate{}, nil + return &stakingtypes.MsgUndelegateResponse{ + Amount: sdk.NewCoin("test", math.NewInt(1)), + }, nil case "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward": return &distrtypes.MsgWithdrawDelegatorRewardResponse{}, nil case "/cosmos.bank.v1beta1.MsgSend": @@ -86,23 +88,44 @@ func newMockContext(t *testing.T) (context.Context, store.KVStoreService) { return nil, errors.New("unrecognized request type") } }, func(ctx context.Context, req transaction.Msg) (transaction.Msg, error) { - _, ok := req.(*banktypes.QueryBalanceRequest) - if !ok { - _, ok = req.(*stakingtypes.QueryParamsRequest) - require.True(t, ok) + typeUrl := sdk.MsgTypeURL(req) + switch typeUrl { + case "/cosmos.staking.v1beta1.QueryParamsRequest": return &stakingtypes.QueryParamsResponse{ Params: stakingtypes.Params{ BondDenom: "test", }, }, nil + case "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest": + return &stakingtypes.QueryUnbondingDelegationResponse{ + Unbond: stakingtypes.UnbondingDelegation{ + DelegatorAddress: "sender", + ValidatorAddress: "val_address", + Entries: []stakingtypes.UnbondingDelegationEntry{ + { + CreationHeight: 1, + CompletionTime: time.Now(), + Balance: math.NewInt(1), + }, + { + CreationHeight: 1, + CompletionTime: time.Now().Add(time.Hour), + Balance: math.NewInt(1), + }, + }, + }, + }, nil + case "/cosmos.bank.v1beta1.QueryBalanceRequest": + return &banktypes.QueryBalanceResponse{ + Balance: &(sdk.Coin{ + Denom: "test", + Amount: TestFunds.AmountOf("test"), + }), + }, nil + default: + return nil, errors.New("unrecognized request type") } - return &banktypes.QueryBalanceResponse{ - Balance: &(sdk.Coin{ - Denom: "test", - Amount: TestFunds.AmountOf("test"), - }), - }, nil }, ) } diff --git a/x/accounts/defaults/lockup/v1/lockup.pb.go b/x/accounts/defaults/lockup/v1/lockup.pb.go index c6c9ac175a3a..7b9e835a9e43 100644 --- a/x/accounts/defaults/lockup/v1/lockup.pb.go +++ b/x/accounts/defaults/lockup/v1/lockup.pb.go @@ -5,6 +5,7 @@ package v1 import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -12,6 +13,7 @@ import ( proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -84,8 +86,126 @@ func (m *Period) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +type UnbondingEntries struct { + Entries []*UnbondingEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (m *UnbondingEntries) Reset() { *m = UnbondingEntries{} } +func (m *UnbondingEntries) String() string { return proto.CompactTextString(m) } +func (*UnbondingEntries) ProtoMessage() {} +func (*UnbondingEntries) Descriptor() ([]byte, []int) { + return fileDescriptor_6b9783f5e2b76d96, []int{1} +} +func (m *UnbondingEntries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnbondingEntries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnbondingEntries.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 *UnbondingEntries) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnbondingEntries.Merge(m, src) +} +func (m *UnbondingEntries) XXX_Size() int { + return m.Size() +} +func (m *UnbondingEntries) XXX_DiscardUnknown() { + xxx_messageInfo_UnbondingEntries.DiscardUnknown(m) +} + +var xxx_messageInfo_UnbondingEntries proto.InternalMessageInfo + +func (m *UnbondingEntries) GetEntries() []*UnbondingEntry { + if m != nil { + return m.Entries + } + return nil +} + +// UnbondingEntry defines an entry tracking the lockup account unbonding operation. +type UnbondingEntry struct { + CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` + // end time of entry + EndTime time.Time `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"` + // unbond amount + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` + // validator address + ValidatorAddress string `protobuf:"bytes,4,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *UnbondingEntry) Reset() { *m = UnbondingEntry{} } +func (m *UnbondingEntry) String() string { return proto.CompactTextString(m) } +func (*UnbondingEntry) ProtoMessage() {} +func (*UnbondingEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_6b9783f5e2b76d96, []int{2} +} +func (m *UnbondingEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnbondingEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnbondingEntry.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 *UnbondingEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnbondingEntry.Merge(m, src) +} +func (m *UnbondingEntry) XXX_Size() int { + return m.Size() +} +func (m *UnbondingEntry) XXX_DiscardUnknown() { + xxx_messageInfo_UnbondingEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_UnbondingEntry proto.InternalMessageInfo + +func (m *UnbondingEntry) GetCreationHeight() int64 { + if m != nil { + return m.CreationHeight + } + return 0 +} + +func (m *UnbondingEntry) GetEndTime() time.Time { + if m != nil { + return m.EndTime + } + return time.Time{} +} + +func (m *UnbondingEntry) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +func (m *UnbondingEntry) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + func init() { proto.RegisterType((*Period)(nil), "cosmos.accounts.defaults.lockup.v1.Period") + proto.RegisterType((*UnbondingEntries)(nil), "cosmos.accounts.defaults.lockup.v1.UnbondingEntries") + proto.RegisterType((*UnbondingEntry)(nil), "cosmos.accounts.defaults.lockup.v1.UnbondingEntry") } func init() { @@ -93,28 +213,40 @@ func init() { } var fileDescriptor_6b9783f5e2b76d96 = []byte{ - // 327 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x31, 0x4e, 0xc3, 0x30, - 0x18, 0x85, 0x63, 0x90, 0x32, 0x04, 0x18, 0xa8, 0x18, 0x4a, 0x07, 0xb7, 0xea, 0x54, 0x55, 0xc2, - 0xbf, 0x02, 0x17, 0x40, 0xa5, 0x62, 0x46, 0x8c, 0x2c, 0xc8, 0x71, 0x5c, 0xd7, 0x6a, 0x92, 0xbf, - 0xaa, 0x9d, 0x8a, 0xde, 0x82, 0x11, 0x71, 0x02, 0xc4, 0xd4, 0x4b, 0x20, 0x75, 0xec, 0xc8, 0x44, - 0x51, 0x33, 0xf4, 0x1a, 0x28, 0x89, 0xb3, 0xb2, 0x24, 0xcf, 0xb2, 0xbf, 0xf7, 0xfe, 0x67, 0x07, - 0x20, 0xd0, 0xa4, 0x68, 0x80, 0x0b, 0x81, 0x79, 0x66, 0x0d, 0xc4, 0x72, 0xc2, 0xf3, 0xc4, 0x1a, - 0x48, 0x50, 0xcc, 0xf2, 0x39, 0x2c, 0x43, 0xa7, 0xd8, 0x7c, 0x81, 0x16, 0x5b, 0xfd, 0x1a, 0x60, - 0x0d, 0xc0, 0x1a, 0x80, 0xb9, 0x63, 0xcb, 0xb0, 0x73, 0xce, 0x53, 0x9d, 0x21, 0x54, 0xdf, 0x1a, - 0xeb, 0x50, 0x97, 0x13, 0x71, 0x23, 0x61, 0x19, 0x46, 0xd2, 0xf2, 0x10, 0x04, 0xea, 0xcc, 0xed, - 0x5f, 0x28, 0x54, 0x58, 0x49, 0x28, 0x55, 0x43, 0x29, 0x44, 0x95, 0x48, 0xa8, 0x56, 0x51, 0x3e, - 0x81, 0x38, 0x5f, 0x70, 0xab, 0xd1, 0x51, 0xfd, 0x2f, 0x12, 0xf8, 0x0f, 0x72, 0xa1, 0x31, 0x6e, - 0xdd, 0x06, 0x7e, 0x22, 0x33, 0x65, 0xa7, 0x6d, 0xd2, 0x23, 0x83, 0x93, 0xeb, 0x4b, 0x56, 0xb3, - 0xac, 0x61, 0xd9, 0xd8, 0xb1, 0xa3, 0xb3, 0xcd, 0x4f, 0xd7, 0x7b, 0xdb, 0x75, 0xc9, 0xc7, 0x61, - 0x3d, 0x24, 0x8f, 0x8e, 0x6b, 0xad, 0x02, 0x9f, 0xa7, 0x65, 0xa7, 0xf6, 0x51, 0xef, 0xb8, 0x72, - 0x70, 0x55, 0xcb, 0x99, 0x99, 0x9b, 0x99, 0xdd, 0xa1, 0xce, 0x46, 0xf7, 0xa5, 0xc3, 0xe7, 0xae, - 0x3b, 0x50, 0xda, 0x4e, 0xf3, 0x88, 0x09, 0x4c, 0x9b, 0x8b, 0xac, 0x7f, 0x57, 0x26, 0x9e, 0x81, - 0x5d, 0xcd, 0xa5, 0xa9, 0x00, 0xf3, 0x7e, 0x58, 0x0f, 0x4f, 0x13, 0xa9, 0xb8, 0x58, 0x3d, 0x97, - 0xad, 0x8d, 0x8b, 0xae, 0x03, 0x47, 0xe3, 0xcd, 0x9e, 0x92, 0xed, 0x9e, 0x92, 0xdf, 0x3d, 0x25, - 0xaf, 0x05, 0xf5, 0xb6, 0x05, 0xf5, 0xbe, 0x0b, 0xea, 0x3d, 0x0d, 0x6b, 0x3f, 0x13, 0xcf, 0x98, - 0x46, 0x78, 0xf9, 0xef, 0x9d, 0x22, 0xbf, 0xaa, 0x7a, 0xf3, 0x17, 0x00, 0x00, 0xff, 0xff, 0xf4, - 0xa4, 0x0b, 0x08, 0xd4, 0x01, 0x00, 0x00, + // 517 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcf, 0x6e, 0x13, 0x31, + 0x10, 0xc6, 0xe3, 0x06, 0xa5, 0xd4, 0x40, 0x69, 0x57, 0x1c, 0xd2, 0x48, 0x6c, 0x42, 0x2e, 0x44, + 0x91, 0x6a, 0x2b, 0xe5, 0xca, 0x01, 0x42, 0x40, 0x1c, 0x10, 0x42, 0xe1, 0xcf, 0x81, 0x4b, 0xf0, + 0xae, 0x5d, 0xc7, 0xca, 0xae, 0x1d, 0xad, 0xbd, 0x2b, 0xf2, 0x10, 0x48, 0x3d, 0x22, 0x9e, 0x00, + 0x71, 0xea, 0x81, 0x57, 0x40, 0xea, 0xb1, 0xe2, 0xc4, 0x89, 0xa2, 0xe4, 0xd0, 0xd7, 0x40, 0x6b, + 0x7b, 0x2b, 0xa5, 0x08, 0xb8, 0xec, 0xce, 0xce, 0xf8, 0xfb, 0xc6, 0xf3, 0x1b, 0x2d, 0xc4, 0xb1, + 0xd2, 0xa9, 0xd2, 0x98, 0xc4, 0xb1, 0xca, 0xa5, 0xd1, 0x98, 0xb2, 0x43, 0x92, 0x27, 0x46, 0xe3, + 0x44, 0xc5, 0xb3, 0x7c, 0x8e, 0x8b, 0x81, 0x8f, 0xd0, 0x3c, 0x53, 0x46, 0x05, 0x5d, 0x27, 0x40, + 0x95, 0x00, 0x55, 0x02, 0xe4, 0x8f, 0x15, 0x83, 0xd6, 0x2e, 0x49, 0x85, 0x54, 0xd8, 0x3e, 0x9d, + 0xac, 0x15, 0xfa, 0x3e, 0x11, 0xd1, 0x0c, 0x17, 0x83, 0x88, 0x19, 0x32, 0xc0, 0xb1, 0x12, 0xd2, + 0xd7, 0x6f, 0x71, 0xc5, 0x95, 0x0d, 0x71, 0x19, 0xf9, 0xec, 0x9e, 0x53, 0x4d, 0x5c, 0xc1, 0x77, + 0xf6, 0x86, 0x5c, 0x29, 0x9e, 0x30, 0x6c, 0xbf, 0xa2, 0xfc, 0x10, 0xd3, 0x3c, 0x23, 0x46, 0xa8, + 0xca, 0xb0, 0x7d, 0xb9, 0x6e, 0x44, 0xca, 0xb4, 0x21, 0xa9, 0x1f, 0xa4, 0xfb, 0x0d, 0xc0, 0xc6, + 0x0b, 0x96, 0x09, 0x45, 0x83, 0x07, 0xb0, 0x91, 0x30, 0xc9, 0xcd, 0xb4, 0x09, 0x3a, 0xa0, 0x77, + 0xed, 0x60, 0x0f, 0x39, 0x31, 0xaa, 0xc4, 0x68, 0xe4, 0xcd, 0x87, 0x37, 0x4e, 0x7e, 0xb6, 0x6b, + 0x1f, 0xcf, 0xda, 0xe0, 0xf3, 0xf9, 0x71, 0x1f, 0x8c, 0xbd, 0x2e, 0x58, 0xc0, 0x06, 0x49, 0x4b, + 0x1e, 0xcd, 0x8d, 0x4e, 0xdd, 0x3a, 0xf8, 0xcb, 0x96, 0xf3, 0x22, 0x3f, 0x2f, 0x7a, 0xa4, 0x84, + 0x1c, 0x3e, 0x29, 0x1d, 0xbe, 0x9c, 0xb5, 0x7b, 0x5c, 0x98, 0x69, 0x1e, 0xa1, 0x58, 0xa5, 0xd5, + 0x12, 0xdc, 0x6b, 0x5f, 0xd3, 0x19, 0x36, 0x8b, 0x39, 0xd3, 0x56, 0xa0, 0x3f, 0x9d, 0x1f, 0xf7, + 0xaf, 0x27, 0x8c, 0x93, 0x78, 0x31, 0x29, 0x89, 0x69, 0xdf, 0xda, 0x35, 0xec, 0xbe, 0x83, 0x3b, + 0xaf, 0x65, 0xa4, 0x24, 0x15, 0x92, 0x3f, 0x96, 0x26, 0x13, 0x4c, 0x07, 0xcf, 0xe0, 0x26, 0x73, + 0x61, 0x13, 0xd8, 0xfb, 0x1c, 0xa0, 0xff, 0xaf, 0x0d, 0xad, 0xd9, 0x2c, 0xc6, 0x95, 0x45, 0xf7, + 0xc3, 0x06, 0xdc, 0x5e, 0xaf, 0x05, 0x77, 0xe1, 0xcd, 0x38, 0x63, 0x16, 0xc9, 0x64, 0xca, 0x04, + 0x9f, 0x1a, 0x8b, 0xae, 0x3e, 0xde, 0xae, 0xd2, 0x4f, 0x6d, 0x36, 0x18, 0xc1, 0xab, 0x4c, 0xd2, + 0x49, 0x09, 0xbf, 0xb9, 0x61, 0xe1, 0xb6, 0xfe, 0x80, 0xfb, 0xaa, 0xda, 0x8c, 0xa3, 0x7b, 0x74, + 0x41, 0x77, 0x93, 0x49, 0x5a, 0x16, 0x83, 0xfb, 0x17, 0x78, 0xeb, 0x7e, 0x41, 0x7f, 0xc5, 0xbb, + 0x55, 0x5a, 0xac, 0x11, 0x0a, 0x9e, 0xc3, 0xdd, 0x82, 0x24, 0x82, 0x12, 0xa3, 0xb2, 0x09, 0xa1, + 0x34, 0x63, 0x5a, 0x37, 0xaf, 0x74, 0x40, 0x6f, 0x6b, 0x78, 0xe7, 0xfb, 0xd7, 0xfd, 0xdb, 0xde, + 0xeb, 0x4d, 0x75, 0xe6, 0xa1, 0x3b, 0xf2, 0xd2, 0x64, 0x42, 0xf2, 0xf1, 0x4e, 0x71, 0x29, 0x3f, + 0x1c, 0x9d, 0x2c, 0x43, 0x70, 0xba, 0x0c, 0xc1, 0xaf, 0x65, 0x08, 0x8e, 0x56, 0x61, 0xed, 0x74, + 0x15, 0xd6, 0x7e, 0xac, 0xc2, 0xda, 0xdb, 0xbe, 0xb3, 0xd2, 0x74, 0x86, 0x84, 0xc2, 0xef, 0xff, + 0xf5, 0x57, 0x45, 0x0d, 0x3b, 0xff, 0xbd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xd3, 0xd6, + 0xb7, 0x82, 0x03, 0x00, 0x00, } func (m *Period) Marshal() (dAtA []byte, err error) { @@ -162,6 +294,96 @@ func (m *Period) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *UnbondingEntries) 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 *UnbondingEntries) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingEntries) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLockup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *UnbondingEntry) 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 *UnbondingEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnbondingEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintLockup(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLockup(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintLockup(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintLockup(dAtA, i, uint64(m.CreationHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintLockup(dAtA []byte, offset int, v uint64) int { offset -= sovLockup(v) base := offset @@ -190,6 +412,41 @@ func (m *Period) Size() (n int) { return n } +func (m *UnbondingEntries) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovLockup(uint64(l)) + } + } + return n +} + +func (m *UnbondingEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovLockup(uint64(m.CreationHeight)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.EndTime) + n += 1 + l + sovLockup(uint64(l)) + l = m.Amount.Size() + n += 1 + l + sovLockup(uint64(l)) + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovLockup(uint64(l)) + } + return n +} + func sovLockup(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -313,6 +570,257 @@ func (m *Period) Unmarshal(dAtA []byte) error { } return nil } +func (m *UnbondingEntries) 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 ErrIntOverflowLockup + } + 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: UnbondingEntries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingEntries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLockup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLockup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, &UnbondingEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLockup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLockup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnbondingEntry) 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 ErrIntOverflowLockup + } + 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: UnbondingEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnbondingEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationHeight", wireType) + } + m.CreationHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreationHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLockup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLockup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLockup + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLockup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLockup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLockup + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLockup + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLockup(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthLockup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipLockup(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/accounts/defaults/lockup/v1/query.pb.go b/x/accounts/defaults/lockup/v1/query.pb.go index c3b9a75d07db..bdea948f1fa2 100644 --- a/x/accounts/defaults/lockup/v1/query.pb.go +++ b/x/accounts/defaults/lockup/v1/query.pb.go @@ -5,6 +5,7 @@ package v1 import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -175,6 +176,97 @@ func (m *QueryLockupAccountInfoResponse) GetOwner() string { return "" } +// QueryUnbondingEntriesRequest is used to query the lockup account unbonding entries. +type QueryUnbondingEntriesRequest struct { + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (m *QueryUnbondingEntriesRequest) Reset() { *m = QueryUnbondingEntriesRequest{} } +func (m *QueryUnbondingEntriesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryUnbondingEntriesRequest) ProtoMessage() {} +func (*QueryUnbondingEntriesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f2c1403191515490, []int{2} +} +func (m *QueryUnbondingEntriesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnbondingEntriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnbondingEntriesRequest.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 *QueryUnbondingEntriesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnbondingEntriesRequest.Merge(m, src) +} +func (m *QueryUnbondingEntriesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryUnbondingEntriesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnbondingEntriesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnbondingEntriesRequest proto.InternalMessageInfo + +func (m *QueryUnbondingEntriesRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +// QueryUnbondingEntriesResponse returns the lockup account unbonding entries. +type QueryUnbondingEntriesResponse struct { + // UnbondingEntry defines the list of unbonding entries. + UnbondingEntries []*UnbondingEntry `protobuf:"bytes,1,rep,name=unbonding_entries,json=unbondingEntries,proto3" json:"unbonding_entries,omitempty"` +} + +func (m *QueryUnbondingEntriesResponse) Reset() { *m = QueryUnbondingEntriesResponse{} } +func (m *QueryUnbondingEntriesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUnbondingEntriesResponse) ProtoMessage() {} +func (*QueryUnbondingEntriesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f2c1403191515490, []int{3} +} +func (m *QueryUnbondingEntriesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnbondingEntriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnbondingEntriesResponse.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 *QueryUnbondingEntriesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnbondingEntriesResponse.Merge(m, src) +} +func (m *QueryUnbondingEntriesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryUnbondingEntriesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnbondingEntriesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnbondingEntriesResponse proto.InternalMessageInfo + +func (m *QueryUnbondingEntriesResponse) GetUnbondingEntries() []*UnbondingEntry { + if m != nil { + return m.UnbondingEntries + } + return nil +} + // QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. type QueryLockingPeriodsRequest struct { } @@ -183,7 +275,7 @@ func (m *QueryLockingPeriodsRequest) Reset() { *m = QueryLockingPeriodsR func (m *QueryLockingPeriodsRequest) String() string { return proto.CompactTextString(m) } func (*QueryLockingPeriodsRequest) ProtoMessage() {} func (*QueryLockingPeriodsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f2c1403191515490, []int{2} + return fileDescriptor_f2c1403191515490, []int{4} } func (m *QueryLockingPeriodsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -222,7 +314,7 @@ func (m *QueryLockingPeriodsResponse) Reset() { *m = QueryLockingPeriods func (m *QueryLockingPeriodsResponse) String() string { return proto.CompactTextString(m) } func (*QueryLockingPeriodsResponse) ProtoMessage() {} func (*QueryLockingPeriodsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f2c1403191515490, []int{3} + return fileDescriptor_f2c1403191515490, []int{5} } func (m *QueryLockingPeriodsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -258,11 +350,97 @@ func (m *QueryLockingPeriodsResponse) GetLockingPeriods() []*Period { return nil } +// QuerySpendableAmountRequest is used to query the lockup account total spendable tokens. +type QuerySpendableAmountRequest struct { +} + +func (m *QuerySpendableAmountRequest) Reset() { *m = QuerySpendableAmountRequest{} } +func (m *QuerySpendableAmountRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySpendableAmountRequest) ProtoMessage() {} +func (*QuerySpendableAmountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f2c1403191515490, []int{6} +} +func (m *QuerySpendableAmountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpendableAmountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpendableAmountRequest.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 *QuerySpendableAmountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpendableAmountRequest.Merge(m, src) +} +func (m *QuerySpendableAmountRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySpendableAmountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpendableAmountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpendableAmountRequest proto.InternalMessageInfo + +// QuerySpendableAmountResponse returns lockup account total spendable tokens. +type QuerySpendableAmountResponse struct { + SpendableTokens github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=spendable_tokens,json=spendableTokens,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"spendable_tokens"` +} + +func (m *QuerySpendableAmountResponse) Reset() { *m = QuerySpendableAmountResponse{} } +func (m *QuerySpendableAmountResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySpendableAmountResponse) ProtoMessage() {} +func (*QuerySpendableAmountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f2c1403191515490, []int{7} +} +func (m *QuerySpendableAmountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySpendableAmountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySpendableAmountResponse.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 *QuerySpendableAmountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySpendableAmountResponse.Merge(m, src) +} +func (m *QuerySpendableAmountResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySpendableAmountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySpendableAmountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySpendableAmountResponse proto.InternalMessageInfo + +func (m *QuerySpendableAmountResponse) GetSpendableTokens() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.SpendableTokens + } + return nil +} + func init() { proto.RegisterType((*QueryLockupAccountInfoRequest)(nil), "cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoRequest") proto.RegisterType((*QueryLockupAccountInfoResponse)(nil), "cosmos.accounts.defaults.lockup.v1.QueryLockupAccountInfoResponse") + proto.RegisterType((*QueryUnbondingEntriesRequest)(nil), "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesRequest") + proto.RegisterType((*QueryUnbondingEntriesResponse)(nil), "cosmos.accounts.defaults.lockup.v1.QueryUnbondingEntriesResponse") proto.RegisterType((*QueryLockingPeriodsRequest)(nil), "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsRequest") proto.RegisterType((*QueryLockingPeriodsResponse)(nil), "cosmos.accounts.defaults.lockup.v1.QueryLockingPeriodsResponse") + proto.RegisterType((*QuerySpendableAmountRequest)(nil), "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountRequest") + proto.RegisterType((*QuerySpendableAmountResponse)(nil), "cosmos.accounts.defaults.lockup.v1.QuerySpendableAmountResponse") } func init() { @@ -270,39 +448,48 @@ func init() { } var fileDescriptor_f2c1403191515490 = []byte{ - // 510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x4d, 0x6f, 0xd3, 0x30, - 0x18, 0xc7, 0x1b, 0xb6, 0xee, 0xc5, 0x85, 0x6d, 0x44, 0x3b, 0x84, 0x02, 0x49, 0xd5, 0x53, 0x35, - 0x09, 0x9b, 0x8e, 0x23, 0x07, 0x44, 0x41, 0x48, 0x48, 0x3b, 0x40, 0xe0, 0xc4, 0x25, 0xca, 0xcb, - 0xd3, 0x60, 0x35, 0xb5, 0x33, 0xdb, 0x29, 0xdb, 0xb7, 0xd8, 0xe7, 0xe0, 0x93, 0xec, 0xb8, 0x23, - 0x27, 0x86, 0xda, 0xef, 0x81, 0x50, 0x62, 0xbb, 0x68, 0x12, 0x2f, 0x3d, 0x74, 0xa7, 0xc4, 0xf6, - 0xf3, 0xfc, 0x7f, 0xcf, 0xe3, 0xbf, 0x6d, 0x84, 0x53, 0x2e, 0xa7, 0x5c, 0x92, 0x38, 0x4d, 0x79, - 0xc5, 0x94, 0x24, 0x19, 0x8c, 0xe3, 0xaa, 0x50, 0x92, 0x14, 0x3c, 0x9d, 0x54, 0x25, 0x99, 0x0d, - 0xc9, 0x69, 0x05, 0xe2, 0x1c, 0x97, 0x82, 0x2b, 0xee, 0xf6, 0x75, 0x3c, 0xb6, 0xf1, 0xd8, 0xc6, - 0x63, 0x1d, 0x8f, 0x67, 0xc3, 0x2e, 0x59, 0x41, 0xd3, 0x44, 0x37, 0xa2, 0x5d, 0xdf, 0x24, 0x24, - 0xb1, 0x04, 0x32, 0x1b, 0x26, 0xa0, 0xe2, 0x21, 0x49, 0x39, 0x65, 0x66, 0xfd, 0x30, 0xe7, 0x39, - 0x6f, 0x7e, 0x49, 0xfd, 0x67, 0x66, 0x83, 0x9c, 0xf3, 0xbc, 0x00, 0xd2, 0x8c, 0x92, 0x6a, 0x4c, - 0x14, 0x9d, 0x82, 0x54, 0xf1, 0xd4, 0xc8, 0xf6, 0x03, 0xf4, 0xf8, 0x7d, 0x5d, 0xfa, 0x49, 0xc3, - 0x7a, 0xa9, 0xab, 0x79, 0xcb, 0xc6, 0x3c, 0x84, 0xd3, 0x0a, 0xa4, 0xea, 0xff, 0x6c, 0x23, 0xff, - 0x6f, 0x11, 0xb2, 0xe4, 0x4c, 0x82, 0x3b, 0x43, 0x07, 0x5c, 0xd0, 0x9c, 0xb2, 0xb8, 0x88, 0xea, - 0x9a, 0x29, 0xcb, 0x3d, 0xa7, 0xb7, 0x31, 0xe8, 0x1c, 0x3f, 0x30, 0x5b, 0x87, 0xeb, 0xaa, 0xb1, - 0xa9, 0x1a, 0xbf, 0xe2, 0x94, 0x8d, 0x9e, 0x5e, 0x7e, 0x0f, 0x5a, 0x5f, 0xaf, 0x83, 0x41, 0x4e, - 0xd5, 0xe7, 0x2a, 0xc1, 0x29, 0x9f, 0xda, 0x3d, 0xd1, 0x9f, 0x27, 0x32, 0x9b, 0x10, 0x75, 0x5e, - 0x82, 0x6c, 0x12, 0x64, 0xb8, 0x6f, 0x21, 0x27, 0x9a, 0xe1, 0x0a, 0xb4, 0x97, 0x41, 0x01, 0x79, - 0xac, 0x20, 0x8b, 0xc6, 0x02, 0xc0, 0xbb, 0xb3, 0x7e, 0xea, 0xbd, 0x25, 0xe2, 0x8d, 0x00, 0x70, - 0xcf, 0xd0, 0xfd, 0xdf, 0x4c, 0xdb, 0xec, 0xc6, 0xfa, 0xb1, 0x07, 0x4b, 0x8a, 0xed, 0xf6, 0x05, - 0x42, 0x52, 0xc5, 0x42, 0x45, 0xb5, 0x85, 0xde, 0x66, 0xcf, 0x19, 0x74, 0x8e, 0xbb, 0x58, 0xfb, - 0x8b, 0xad, 0xbf, 0xf8, 0xa3, 0xf5, 0x77, 0xb4, 0x79, 0x71, 0x1d, 0x38, 0xe1, 0x6e, 0x93, 0x53, - 0xcf, 0xba, 0xcf, 0xd1, 0x0e, 0xb0, 0x4c, 0xa7, 0xb7, 0x57, 0x4c, 0xdf, 0x06, 0x96, 0x35, 0xc9, - 0x0c, 0xdd, 0xad, 0xbb, 0x85, 0x2c, 0xaa, 0xcf, 0x9c, 0xf4, 0xb6, 0xd6, 0xdf, 0x72, 0x47, 0x03, - 0x9a, 0x41, 0xed, 0x6d, 0xc5, 0x6e, 0x10, 0xb7, 0x6f, 0xc1, 0x5b, 0x8b, 0xd0, 0xcc, 0x43, 0xd4, - 0xe6, 0x5f, 0x18, 0x08, 0x6f, 0xa7, 0xe7, 0x0c, 0x76, 0x43, 0x3d, 0xe8, 0x3f, 0x42, 0xdd, 0xe5, - 0xf9, 0xa7, 0x2c, 0x7f, 0x07, 0x82, 0xf2, 0x4c, 0xda, 0xeb, 0x21, 0xd0, 0xc3, 0x3f, 0xae, 0x9a, - 0xab, 0xf1, 0x01, 0xed, 0x9b, 0x43, 0x12, 0x95, 0x7a, 0xc9, 0xdc, 0x8c, 0x23, 0xfc, 0xff, 0x47, - 0x02, 0x6b, 0xb5, 0x70, 0xaf, 0xb8, 0x21, 0x3e, 0x7a, 0x7d, 0x39, 0xf7, 0x9d, 0xab, 0xb9, 0xef, - 0xfc, 0x98, 0xfb, 0xce, 0xc5, 0xc2, 0x6f, 0x5d, 0x2d, 0xfc, 0xd6, 0xb7, 0x85, 0xdf, 0xfa, 0x74, - 0xa4, 0x45, 0x65, 0x36, 0xc1, 0x94, 0x93, 0xb3, 0x7f, 0xbd, 0x2e, 0xc9, 0x56, 0x63, 0xfa, 0xb3, - 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x78, 0xc7, 0xe4, 0x56, 0xde, 0x04, 0x00, 0x00, + // 654 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcb, 0x4e, 0xdb, 0x4c, + 0x14, 0x8e, 0x7f, 0xee, 0xc3, 0xff, 0x43, 0x88, 0x58, 0x84, 0xfc, 0xe0, 0x50, 0xaf, 0x22, 0x24, + 0x66, 0x1a, 0xba, 0xec, 0xa2, 0x22, 0xbd, 0x48, 0x95, 0x50, 0xd5, 0x1a, 0xda, 0x45, 0x37, 0x96, + 0x9d, 0x39, 0x71, 0x47, 0x71, 0x66, 0xc2, 0xcc, 0x38, 0x85, 0x5d, 0x1f, 0x81, 0x55, 0x1f, 0xa2, + 0xeb, 0x3e, 0x04, 0x4b, 0xd4, 0x55, 0x57, 0xa5, 0x82, 0xf7, 0xa8, 0x2a, 0x7b, 0x66, 0x82, 0x80, + 0x5e, 0x58, 0xc0, 0x2a, 0x3e, 0x73, 0xce, 0xf9, 0x2e, 0x3e, 0x3e, 0x13, 0x84, 0xbb, 0x42, 0x0d, + 0x84, 0x22, 0x71, 0xb7, 0x2b, 0x72, 0xae, 0x15, 0xa1, 0xd0, 0x8b, 0xf3, 0x4c, 0x2b, 0x92, 0x89, + 0x6e, 0x3f, 0x1f, 0x92, 0x51, 0x9b, 0xec, 0xe7, 0x20, 0x0f, 0xf1, 0x50, 0x0a, 0x2d, 0x6a, 0x81, + 0xa9, 0xc7, 0xae, 0x1e, 0xbb, 0x7a, 0x6c, 0xea, 0xf1, 0xa8, 0xdd, 0x20, 0x37, 0xc0, 0xb4, 0xd5, + 0x25, 0x68, 0xc3, 0xb7, 0x0d, 0x49, 0xac, 0x80, 0x8c, 0xda, 0x09, 0xe8, 0xb8, 0x4d, 0xba, 0x82, + 0x71, 0x9b, 0x5f, 0x4e, 0x45, 0x2a, 0xca, 0x47, 0x52, 0x3c, 0xd9, 0xd3, 0x66, 0x2a, 0x44, 0x9a, + 0x01, 0x29, 0xa3, 0x24, 0xef, 0x11, 0xcd, 0x06, 0xa0, 0x74, 0x3c, 0x70, 0xb0, 0x2b, 0x06, 0x36, + 0x32, 0x9d, 0x56, 0x78, 0x19, 0x04, 0x4d, 0xb4, 0xf6, 0xaa, 0x70, 0xb5, 0x53, 0xca, 0xd8, 0x36, + 0x42, 0x9f, 0xf3, 0x9e, 0x08, 0x61, 0x3f, 0x07, 0xa5, 0x83, 0x1f, 0x53, 0xc8, 0xff, 0x5d, 0x85, + 0x1a, 0x0a, 0xae, 0xa0, 0x36, 0x42, 0x55, 0x21, 0x59, 0xca, 0x78, 0x9c, 0x45, 0x85, 0x1d, 0xc6, + 0xd3, 0xba, 0xb7, 0x3e, 0xd1, 0x9a, 0xdf, 0x5a, 0xb1, 0x6f, 0x15, 0x17, 0x86, 0xb0, 0x35, 0x84, + 0x1f, 0x0b, 0xc6, 0x3b, 0xf7, 0x8f, 0xbf, 0x35, 0x2b, 0x9f, 0x4e, 0x9b, 0xad, 0x94, 0xe9, 0x77, + 0x79, 0x82, 0xbb, 0x62, 0xe0, 0x5e, 0x97, 0xf9, 0xd9, 0x54, 0xb4, 0x4f, 0xf4, 0xe1, 0x10, 0x54, + 0xd9, 0xa0, 0xc2, 0x45, 0x47, 0xb2, 0x63, 0x38, 0x6a, 0x12, 0x2d, 0x50, 0xc8, 0x20, 0x8d, 0x35, + 0xd0, 0xa8, 0x27, 0x01, 0xea, 0xff, 0xdc, 0x3e, 0xeb, 0x7f, 0x63, 0x8a, 0x67, 0x12, 0xa0, 0x76, + 0x80, 0x96, 0x2e, 0x38, 0x9d, 0xd9, 0x89, 0xdb, 0xa7, 0xad, 0x8e, 0x59, 0x9c, 0xdb, 0x47, 0x08, + 0x29, 0x1d, 0x4b, 0x1d, 0x15, 0xd3, 0xad, 0x4f, 0xae, 0x7b, 0xad, 0xf9, 0xad, 0x06, 0x36, 0xa3, + 0xc7, 0x6e, 0xf4, 0x78, 0xcf, 0x8d, 0xbe, 0x33, 0x79, 0x74, 0xda, 0xf4, 0xc2, 0xb9, 0xb2, 0xa7, + 0x38, 0xad, 0x3d, 0x44, 0xb3, 0xc0, 0xa9, 0x69, 0x9f, 0xba, 0x61, 0xfb, 0x0c, 0x70, 0x5a, 0x36, + 0x73, 0xf4, 0x6f, 0xe1, 0x16, 0x68, 0x54, 0x7c, 0x8e, 0xaa, 0x3e, 0x7d, 0xfb, 0x96, 0xe7, 0x0d, + 0x41, 0x19, 0x14, 0xb3, 0xcd, 0xf9, 0x25, 0xc6, 0x99, 0x3b, 0x98, 0xad, 0xa3, 0x30, 0x9c, 0xcb, + 0x68, 0x4a, 0xbc, 0xe7, 0x20, 0xeb, 0xb3, 0xeb, 0x5e, 0x6b, 0x2e, 0x34, 0x41, 0xc0, 0xd1, 0x6a, + 0xf9, 0xfd, 0xbf, 0xe6, 0x89, 0xe0, 0x94, 0xf1, 0xf4, 0x29, 0xd7, 0x92, 0x81, 0xb2, 0x0b, 0x52, + 0x7b, 0x81, 0x96, 0x46, 0x71, 0xc6, 0x68, 0xac, 0x85, 0x8c, 0x62, 0x4a, 0x25, 0x28, 0x55, 0xf7, + 0x0a, 0x84, 0xce, 0xbd, 0x2f, 0x9f, 0x37, 0xd7, 0xac, 0xde, 0x37, 0xae, 0x66, 0xdb, 0x94, 0xec, + 0x6a, 0xc9, 0x78, 0x1a, 0x56, 0x47, 0x57, 0xce, 0x83, 0x0f, 0x9e, 0x5d, 0xc9, 0xeb, 0x84, 0x76, + 0xdf, 0x22, 0xb4, 0x94, 0xbb, 0x5c, 0x04, 0x26, 0x69, 0x17, 0x6e, 0x0b, 0xff, 0xfd, 0x5a, 0xc2, + 0x97, 0x80, 0x0f, 0xc3, 0x6a, 0x7e, 0x85, 0x28, 0x58, 0x45, 0x8d, 0xf1, 0xca, 0x33, 0x9e, 0xbe, + 0x04, 0xc9, 0x04, 0x75, 0x86, 0x03, 0x89, 0xfe, 0xff, 0x65, 0xd6, 0xaa, 0xdb, 0x45, 0x8b, 0x76, + 0x2f, 0xa2, 0xa1, 0x49, 0x59, 0x6d, 0x1b, 0x37, 0xd1, 0x66, 0xd0, 0xc2, 0x85, 0xec, 0x12, 0x78, + 0xb0, 0x66, 0x39, 0x77, 0x87, 0xc0, 0x69, 0x9c, 0x64, 0xb0, 0x3d, 0x28, 0x20, 0x9c, 0xa4, 0x8f, + 0x9e, 0x1d, 0xd2, 0xb5, 0xfc, 0xc5, 0x15, 0xa5, 0x5c, 0x2a, 0xd2, 0xa2, 0x0f, 0x5c, 0xdd, 0xc9, + 0x15, 0x35, 0x26, 0xd9, 0x2b, 0x39, 0x3a, 0x4f, 0x8e, 0xcf, 0x7c, 0xef, 0xe4, 0xcc, 0xf7, 0xbe, + 0x9f, 0xf9, 0xde, 0xd1, 0xb9, 0x5f, 0x39, 0x39, 0xf7, 0x2b, 0x5f, 0xcf, 0xfd, 0xca, 0xdb, 0x0d, + 0x03, 0xa1, 0x68, 0x1f, 0x33, 0x41, 0x0e, 0xfe, 0xf4, 0x1f, 0x91, 0x4c, 0x97, 0xfb, 0xf9, 0xe0, + 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, 0xa7, 0xeb, 0x0d, 0xa4, 0x06, 0x00, 0x00, } func (m *QueryLockupAccountInfoRequest) Marshal() (dAtA []byte, err error) { @@ -448,6 +635,73 @@ func (m *QueryLockupAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *QueryUnbondingEntriesRequest) 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 *QueryUnbondingEntriesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnbondingEntriesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryUnbondingEntriesResponse) 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 *QueryUnbondingEntriesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnbondingEntriesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UnbondingEntries) > 0 { + for iNdEx := len(m.UnbondingEntries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UnbondingEntries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryLockingPeriodsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -508,6 +762,66 @@ func (m *QueryLockingPeriodsResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *QuerySpendableAmountRequest) 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 *QuerySpendableAmountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpendableAmountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySpendableAmountResponse) 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 *QuerySpendableAmountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySpendableAmountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpendableTokens) > 0 { + for iNdEx := len(m.SpendableTokens) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SpendableTokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -579,6 +893,34 @@ func (m *QueryLockupAccountInfoResponse) Size() (n int) { return n } +func (m *QueryUnbondingEntriesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUnbondingEntriesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UnbondingEntries) > 0 { + for _, e := range m.UnbondingEntries { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryLockingPeriodsRequest) Size() (n int) { if m == nil { return 0 @@ -603,6 +945,30 @@ func (m *QueryLockingPeriodsResponse) Size() (n int) { return n } +func (m *QuerySpendableAmountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySpendableAmountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SpendableTokens) > 0 { + for _, e := range m.SpendableTokens { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -983,7 +1349,7 @@ func (m *QueryLockupAccountInfoResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLockingPeriodsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryUnbondingEntriesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1006,15 +1372,181 @@ func (m *QueryLockingPeriodsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLockingPeriodsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryUnbondingEntriesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryUnbondingEntriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryUnbondingEntriesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryUnbondingEntriesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnbondingEntriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEntries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UnbondingEntries = append(m.UnbondingEntries, &UnbondingEntry{}) + if err := m.UnbondingEntries[len(m.UnbondingEntries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLockingPeriodsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryLockingPeriodsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) if err != nil { return err } @@ -1117,6 +1649,140 @@ func (m *QueryLockingPeriodsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySpendableAmountRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpendableAmountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpendableAmountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySpendableAmountResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySpendableAmountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySpendableAmountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpendableTokens", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpendableTokens = append(m.SpendableTokens, types.Coin{}) + if err := m.SpendableTokens[len(m.SpendableTokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/accounts/defaults/lockup/v1/tx.pb.go b/x/accounts/defaults/lockup/v1/tx.pb.go index eb831479e0fc..858e49e2758b 100644 --- a/x/accounts/defaults/lockup/v1/tx.pb.go +++ b/x/accounts/defaults/lockup/v1/tx.pb.go @@ -441,100 +441,6 @@ func (m *MsgExecuteMessagesResponse) GetResponses() []*any.Any { return nil } -// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of -// choice -type MsgWithdraw struct { - Withdrawer string `protobuf:"bytes,1,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Denoms []string `protobuf:"bytes,3,rep,name=denoms,proto3" json:"denoms,omitempty"` -} - -func (m *MsgWithdraw) Reset() { *m = MsgWithdraw{} } -func (m *MsgWithdraw) String() string { return proto.CompactTextString(m) } -func (*MsgWithdraw) ProtoMessage() {} -func (*MsgWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_84e5f410632b9d39, []int{9} -} -func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgWithdraw.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 *MsgWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdraw.Merge(m, src) -} -func (m *MsgWithdraw) XXX_Size() int { - return m.Size() -} -func (m *MsgWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgWithdraw proto.InternalMessageInfo - -// MsgWithdrawResponse defines the response for MsgWithdraw -type MsgWithdrawResponse struct { - Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` - AmountReceived github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount_received"` -} - -func (m *MsgWithdrawResponse) Reset() { *m = MsgWithdrawResponse{} } -func (m *MsgWithdrawResponse) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawResponse) ProtoMessage() {} -func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_84e5f410632b9d39, []int{10} -} -func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgWithdrawResponse.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 *MsgWithdrawResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawResponse.Merge(m, src) -} -func (m *MsgWithdrawResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgWithdrawResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgWithdrawResponse proto.InternalMessageInfo - -func (m *MsgWithdrawResponse) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -func (m *MsgWithdrawResponse) GetAmountReceived() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.AmountReceived - } - return nil -} - func init() { proto.RegisterType((*MsgInitLockupAccount)(nil), "cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccount") proto.RegisterType((*MsgInitLockupAccountResponse)(nil), "cosmos.accounts.defaults.lockup.v1.MsgInitLockupAccountResponse") @@ -545,8 +451,6 @@ func init() { proto.RegisterType((*MsgWithdrawReward)(nil), "cosmos.accounts.defaults.lockup.v1.MsgWithdrawReward") proto.RegisterType((*MsgSend)(nil), "cosmos.accounts.defaults.lockup.v1.MsgSend") proto.RegisterType((*MsgExecuteMessagesResponse)(nil), "cosmos.accounts.defaults.lockup.v1.MsgExecuteMessagesResponse") - proto.RegisterType((*MsgWithdraw)(nil), "cosmos.accounts.defaults.lockup.v1.MsgWithdraw") - proto.RegisterType((*MsgWithdrawResponse)(nil), "cosmos.accounts.defaults.lockup.v1.MsgWithdrawResponse") } func init() { @@ -554,59 +458,53 @@ func init() { } var fileDescriptor_84e5f410632b9d39 = []byte{ - // 817 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x4f, 0xe3, 0x46, - 0x14, 0x8e, 0x13, 0x35, 0x90, 0xa1, 0x40, 0x31, 0x51, 0x09, 0x51, 0xb1, 0x69, 0x24, 0xd4, 0x28, - 0x15, 0xe3, 0x86, 0x56, 0x6a, 0x15, 0xf5, 0x42, 0x4a, 0xab, 0x56, 0x6a, 0x2a, 0x14, 0xfa, 0x43, - 0xea, 0xa1, 0xd1, 0xc4, 0x1e, 0x06, 0x8b, 0x78, 0x26, 0xf2, 0x4c, 0x12, 0x72, 0xab, 0xaa, 0x1e, - 0x2a, 0x4e, 0x9c, 0x7b, 0xe2, 0xd8, 0x72, 0x4a, 0x25, 0xfe, 0x08, 0x8e, 0x88, 0x13, 0xa7, 0xb2, - 0x0a, 0x2b, 0x85, 0x3f, 0x63, 0x65, 0xcf, 0x98, 0x4d, 0x80, 0x65, 0xb3, 0x39, 0xec, 0x4a, 0x7b, - 0x89, 0x3c, 0xf3, 0x7d, 0xef, 0xbd, 0xef, 0x7d, 0x33, 0xcf, 0x0e, 0xf8, 0xd8, 0x66, 0xdc, 0x63, - 0xdc, 0x42, 0xb6, 0xcd, 0x5a, 0x54, 0x70, 0xcb, 0xc1, 0xbb, 0xa8, 0xd5, 0x10, 0xdc, 0x6a, 0x30, - 0x7b, 0xbf, 0xd5, 0xb4, 0xda, 0x45, 0x4b, 0x1c, 0xc0, 0xa6, 0xcf, 0x04, 0xd3, 0x73, 0x92, 0x0c, - 0x23, 0x32, 0x8c, 0xc8, 0x50, 0x92, 0x61, 0xbb, 0x98, 0x5d, 0x40, 0x9e, 0x4b, 0x99, 0x15, 0xfe, - 0xca, 0xb0, 0xac, 0xa1, 0x6a, 0xd4, 0x11, 0xc7, 0x56, 0xbb, 0x58, 0xc7, 0x02, 0x15, 0x2d, 0x9b, - 0xb9, 0x54, 0xe1, 0xd6, 0x18, 0x1a, 0x54, 0x01, 0x19, 0xb0, 0xa4, 0x02, 0x3c, 0x4e, 0x02, 0xcc, - 0xe3, 0x44, 0x01, 0xcb, 0x12, 0xa8, 0x85, 0x2b, 0x95, 0x56, 0x41, 0x69, 0xc2, 0x08, 0x93, 0xfb, - 0xc1, 0x53, 0x14, 0x40, 0x18, 0x23, 0x0d, 0x6c, 0x85, 0xab, 0x7a, 0x6b, 0xd7, 0x42, 0xb4, 0xab, - 0x20, 0xf3, 0x2e, 0x24, 0x5c, 0x0f, 0x73, 0x81, 0x3c, 0xa5, 0x22, 0xf7, 0x7b, 0x1c, 0xa4, 0x2b, - 0x9c, 0x7c, 0x47, 0x5d, 0xf1, 0x7d, 0xa8, 0x6e, 0x53, 0xea, 0xd7, 0x21, 0x78, 0x87, 0x75, 0x28, - 0xf6, 0x33, 0xda, 0xaa, 0x96, 0x4f, 0x95, 0x33, 0x17, 0xa7, 0xeb, 0x69, 0xa5, 0x65, 0xd3, 0x71, - 0x7c, 0xcc, 0xf9, 0x8e, 0xf0, 0x5d, 0x4a, 0xaa, 0x92, 0xa6, 0x6f, 0x81, 0x69, 0x4c, 0x9d, 0x5a, - 0x90, 0x3f, 0x13, 0x5f, 0xd5, 0xf2, 0x33, 0x1b, 0x59, 0x28, 0x8b, 0xc3, 0xa8, 0x38, 0xfc, 0x31, - 0x2a, 0x5e, 0x9e, 0x3d, 0xfb, 0xdf, 0x8c, 0x1d, 0x5d, 0x99, 0xda, 0x3f, 0x83, 0x5e, 0x41, 0xab, - 0x4e, 0x61, 0xea, 0x04, 0xa0, 0xfe, 0x2d, 0x00, 0x5c, 0x20, 0x5f, 0xc8, 0x3c, 0x89, 0x57, 0xcd, - 0x93, 0x0a, 0x83, 0x03, 0xb8, 0x94, 0xbf, 0x39, 0x36, 0xb5, 0xc3, 0x41, 0xaf, 0x60, 0x4a, 0xd5, - 0xeb, 0xdc, 0xd9, 0xb7, 0x1e, 0xea, 0x34, 0x67, 0x80, 0x0f, 0x1e, 0xda, 0xaf, 0x62, 0xde, 0x64, - 0x94, 0xe3, 0xdc, 0xbf, 0x71, 0xb0, 0xa2, 0x08, 0xdb, 0xd8, 0x77, 0x99, 0xe3, 0xda, 0x01, 0xd1, - 0xa5, 0x64, 0x52, 0xaf, 0x46, 0xbb, 0x8c, 0x4f, 0xde, 0xa5, 0xfe, 0x1b, 0x98, 0x6f, 0x48, 0x2d, - 0xb5, 0x66, 0xa8, 0x8d, 0x67, 0x12, 0xab, 0x89, 0xfc, 0xcc, 0x46, 0x01, 0xbe, 0xfc, 0x9a, 0x43, - 0xd9, 0x4e, 0x39, 0x15, 0xa4, 0x97, 0xa9, 0xe7, 0x54, 0x36, 0x89, 0xf0, 0x12, 0xbc, 0x39, 0x36, - 0x63, 0x81, 0x8b, 0x6b, 0xf7, 0x5d, 0x94, 0x9c, 0x51, 0x2f, 0x3f, 0x02, 0x6b, 0x8f, 0x5a, 0x75, - 0x6b, 0x6a, 0x5f, 0x03, 0x33, 0x15, 0x4e, 0xb6, 0x70, 0x03, 0x13, 0x24, 0xb0, 0xfe, 0x09, 0x48, - 0x72, 0x4c, 0x9d, 0x31, 0x3c, 0x54, 0x3c, 0xfd, 0x07, 0xb0, 0xd0, 0x46, 0x0d, 0xd7, 0x41, 0x82, - 0xf9, 0x35, 0x24, 0x29, 0xa1, 0x97, 0xa9, 0xf2, 0x87, 0x17, 0xa7, 0xeb, 0x2b, 0x2a, 0xf8, 0xe7, - 0x88, 0x33, 0x9a, 0xe5, 0xbd, 0xf6, 0x9d, 0x7d, 0xfd, 0x4b, 0x90, 0x44, 0x5e, 0xa0, 0x51, 0x5d, - 0xbb, 0xe5, 0xc8, 0xc1, 0x60, 0xe2, 0xa1, 0x9a, 0x78, 0xf8, 0x15, 0x73, 0xe9, 0xb0, 0x61, 0x2a, - 0xa6, 0xb4, 0xf8, 0xd7, 0xb1, 0x19, 0x0b, 0xcc, 0xfa, 0x63, 0xd0, 0x2b, 0x28, 0x89, 0xb9, 0xa7, - 0x1a, 0x98, 0xad, 0x70, 0xf2, 0x13, 0x75, 0xde, 0xea, 0x36, 0x4f, 0x34, 0xb0, 0x50, 0xe1, 0xe4, - 0x17, 0x57, 0xec, 0x39, 0x3e, 0xea, 0x54, 0x71, 0x07, 0xf9, 0xce, 0x9b, 0x6f, 0xf5, 0x61, 0xb1, - 0x7f, 0xc6, 0xc1, 0x54, 0x85, 0x93, 0x1d, 0x4c, 0x27, 0x91, 0xf8, 0x39, 0x00, 0x82, 0xdd, 0xd1, - 0xf6, 0xe2, 0xa8, 0x94, 0x60, 0x91, 0xed, 0xdd, 0x21, 0xdb, 0x13, 0x8f, 0xdb, 0xfe, 0x4d, 0x60, - 0xfb, 0xc9, 0x95, 0x99, 0x27, 0xae, 0xd8, 0x6b, 0xd5, 0xa1, 0xcd, 0xbc, 0xe8, 0xe3, 0x32, 0x34, - 0x84, 0xa2, 0xdb, 0xc4, 0x3c, 0x0c, 0xe0, 0x7f, 0x0f, 0x7a, 0x85, 0x77, 0x83, 0x0b, 0x66, 0x77, - 0x6b, 0xc1, 0x17, 0x89, 0x8f, 0x71, 0x66, 0xdb, 0x20, 0x5b, 0xe1, 0xe4, 0xeb, 0x03, 0x6c, 0xb7, - 0x04, 0xae, 0x60, 0xce, 0x11, 0xc1, 0x3c, 0x9a, 0x4e, 0x7d, 0x03, 0xa4, 0x7c, 0xf5, 0xcc, 0x33, - 0x5a, 0x28, 0x38, 0x7d, 0xef, 0xfd, 0xb4, 0x49, 0xbb, 0xd5, 0xe7, 0xb4, 0xdc, 0x7f, 0x72, 0xa2, - 0xa3, 0x5b, 0xa0, 0x7f, 0x01, 0x40, 0x47, 0x3d, 0x8f, 0x61, 0xf0, 0x10, 0x77, 0x72, 0x93, 0xdf, - 0x07, 0x49, 0x07, 0x53, 0xe6, 0xc9, 0x97, 0x60, 0xaa, 0xaa, 0x56, 0xa5, 0xa5, 0x61, 0x07, 0x86, - 0x2a, 0xe5, 0x2e, 0x35, 0xb0, 0x38, 0x72, 0x73, 0x55, 0xff, 0x9f, 0x81, 0x69, 0x1f, 0xdb, 0xd8, - 0x6d, 0x8f, 0xa1, 0xfc, 0x96, 0xa9, 0x1f, 0x6a, 0x60, 0x5e, 0x7a, 0x5e, 0x53, 0x7b, 0x4e, 0x26, - 0xfe, 0xba, 0x4e, 0x7b, 0x4e, 0x56, 0xae, 0xaa, 0xc2, 0xe5, 0xad, 0xb3, 0xbe, 0xa1, 0x9d, 0xf7, - 0x0d, 0xed, 0x49, 0xdf, 0xd0, 0x8e, 0xae, 0x8d, 0xd8, 0xf9, 0xb5, 0x11, 0xbb, 0xbc, 0x36, 0x62, - 0xbf, 0x16, 0x64, 0x5e, 0xee, 0xec, 0x43, 0x97, 0x59, 0x07, 0x8f, 0xfd, 0x63, 0xa9, 0x27, 0xc3, - 0xd3, 0xfe, 0xf4, 0x59, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x35, 0x67, 0x40, 0x62, 0x09, 0x00, - 0x00, + // 735 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0xbf, 0x4f, 0x1b, 0x49, + 0x18, 0xf5, 0xda, 0x3a, 0x38, 0x0f, 0xc7, 0xdd, 0xb1, 0x67, 0xe9, 0x8c, 0x75, 0xec, 0x72, 0x96, + 0xd0, 0x59, 0x3e, 0x31, 0x7b, 0xe6, 0x8a, 0x48, 0x28, 0x0d, 0x0e, 0x89, 0x12, 0x29, 0x8e, 0x90, + 0xc9, 0x0f, 0x29, 0x45, 0xac, 0xf1, 0xee, 0x30, 0xac, 0xf0, 0xce, 0x58, 0xfb, 0x8d, 0x0d, 0xee, + 0xa2, 0x28, 0x45, 0x94, 0x8a, 0x3a, 0x15, 0x65, 0x42, 0xe5, 0x82, 0x3f, 0x82, 0x12, 0x51, 0xa5, + 0x0a, 0x91, 0x89, 0x64, 0xfe, 0x8c, 0x68, 0x77, 0x66, 0x13, 0x7e, 0x85, 0x10, 0x9a, 0x48, 0x69, + 0xac, 0xdd, 0x79, 0xef, 0x7b, 0xdf, 0xfb, 0x9e, 0x67, 0x76, 0xd0, 0xbf, 0xae, 0x80, 0x40, 0x80, + 0x43, 0x5c, 0x57, 0x74, 0xb8, 0x04, 0xc7, 0xa3, 0x2b, 0xa4, 0xd3, 0x92, 0xe0, 0xb4, 0x84, 0xbb, + 0xd6, 0x69, 0x3b, 0xdd, 0x8a, 0x23, 0x37, 0x70, 0x3b, 0x14, 0x52, 0x98, 0x45, 0x45, 0xc6, 0x09, + 0x19, 0x27, 0x64, 0xac, 0xc8, 0xb8, 0x5b, 0x29, 0x4c, 0x90, 0xc0, 0xe7, 0xc2, 0x89, 0x7f, 0x55, + 0x59, 0xc1, 0xd2, 0x3d, 0x9a, 0x04, 0xa8, 0xd3, 0xad, 0x34, 0xa9, 0x24, 0x15, 0xc7, 0x15, 0x3e, + 0xd7, 0xb8, 0x73, 0x09, 0x0f, 0xba, 0x81, 0x2a, 0xf8, 0x53, 0x17, 0x04, 0xc0, 0x22, 0x2c, 0x00, + 0xa6, 0x81, 0x49, 0x05, 0x34, 0xe2, 0x37, 0x2d, 0xab, 0xa1, 0x1c, 0x13, 0x4c, 0xa8, 0xf5, 0xe8, + 0x29, 0x29, 0x60, 0x42, 0xb0, 0x16, 0x75, 0xe2, 0xb7, 0x66, 0x67, 0xc5, 0x21, 0xbc, 0xa7, 0x21, + 0xfb, 0x34, 0x24, 0xfd, 0x80, 0x82, 0x24, 0x81, 0x76, 0x51, 0x7c, 0x9a, 0x46, 0xb9, 0x1a, 0xb0, + 0x3b, 0xdc, 0x97, 0x77, 0x63, 0x77, 0x0b, 0xca, 0xbf, 0x89, 0xd1, 0x4f, 0x62, 0x9d, 0xd3, 0x30, + 0x6f, 0x4c, 0x1b, 0xa5, 0x6c, 0x35, 0xbf, 0xbf, 0x33, 0x9b, 0xd3, 0x5e, 0x16, 0x3c, 0x2f, 0xa4, + 0x00, 0xcb, 0x32, 0xf4, 0x39, 0xab, 0x2b, 0x9a, 0xb9, 0x88, 0x7e, 0xa6, 0xdc, 0x6b, 0x44, 0xfa, + 0xf9, 0xf4, 0xb4, 0x51, 0x1a, 0x9b, 0x2b, 0x60, 0xd5, 0x1c, 0x27, 0xcd, 0xf1, 0xfd, 0xa4, 0x79, + 0x75, 0x7c, 0xf7, 0x9d, 0x9d, 0xda, 0x3c, 0xb0, 0x8d, 0xd7, 0xc3, 0x7e, 0xd9, 0xa8, 0x8f, 0x52, + 0xee, 0x45, 0xa0, 0x79, 0x1b, 0x21, 0x90, 0x24, 0x94, 0x4a, 0x27, 0xf3, 0xad, 0x3a, 0xd9, 0xb8, + 0x38, 0x82, 0xe7, 0x4b, 0x47, 0x5b, 0xb6, 0xf1, 0x72, 0xd8, 0x2f, 0xdb, 0xca, 0xf5, 0x2c, 0x78, + 0x6b, 0xce, 0x79, 0x93, 0x16, 0x2d, 0xf4, 0xd7, 0x79, 0xeb, 0x75, 0x0a, 0x6d, 0xc1, 0x81, 0x16, + 0xdf, 0xa4, 0xd1, 0x94, 0x26, 0x2c, 0xd1, 0xd0, 0x17, 0x9e, 0xef, 0x46, 0x44, 0x9f, 0xb3, 0xab, + 0x66, 0x75, 0x72, 0xca, 0xf4, 0xd5, 0xa7, 0x34, 0x9f, 0xa0, 0xdf, 0x5a, 0xca, 0x4b, 0xa3, 0x1d, + 0x7b, 0x83, 0x7c, 0x66, 0x3a, 0x53, 0x1a, 0x9b, 0x2b, 0xe3, 0xaf, 0x6f, 0x73, 0xac, 0xc6, 0xa9, + 0x66, 0x23, 0x79, 0x25, 0xfd, 0xab, 0x56, 0x53, 0x08, 0xcc, 0xe3, 0xa3, 0x2d, 0x3b, 0x15, 0xa5, + 0x38, 0x73, 0x36, 0x45, 0xc5, 0x39, 0x99, 0xe5, 0x3f, 0x68, 0xe6, 0xc2, 0xa8, 0x3e, 0x85, 0x3a, + 0x30, 0xd0, 0x58, 0x0d, 0xd8, 0x22, 0x6d, 0x51, 0x46, 0x24, 0x35, 0xff, 0x43, 0x23, 0x40, 0xb9, + 0x77, 0x89, 0x0c, 0x35, 0xcf, 0xbc, 0x87, 0x26, 0xba, 0xa4, 0xe5, 0x7b, 0x44, 0x8a, 0xb0, 0x41, + 0x14, 0x25, 0xce, 0x32, 0x5b, 0xfd, 0x7b, 0x7f, 0x67, 0x76, 0x4a, 0x17, 0x3f, 0x4c, 0x38, 0x27, + 0x55, 0x7e, 0xef, 0x9e, 0x5a, 0x37, 0xaf, 0xa3, 0x11, 0x12, 0x44, 0x1e, 0xf5, 0xb6, 0x9b, 0x4c, + 0x12, 0x8c, 0x4e, 0x3c, 0xd6, 0x27, 0x1e, 0xdf, 0x10, 0x3e, 0x3f, 0x1e, 0x98, 0xae, 0x99, 0xff, + 0xe3, 0xc5, 0x96, 0x9d, 0x8a, 0xc2, 0x7a, 0x36, 0xec, 0x97, 0xb5, 0xc5, 0xe2, 0x07, 0x03, 0x8d, + 0xd7, 0x80, 0x3d, 0xe0, 0xde, 0x0f, 0x3d, 0xe6, 0xb6, 0x81, 0x26, 0x6a, 0xc0, 0x1e, 0xf9, 0x72, + 0xd5, 0x0b, 0xc9, 0x7a, 0x9d, 0xae, 0x93, 0xd0, 0xfb, 0xfe, 0xa3, 0x9e, 0x6f, 0xf6, 0x79, 0x1a, + 0x8d, 0xd6, 0x80, 0x2d, 0x53, 0x7e, 0x15, 0x8b, 0xd7, 0x10, 0x92, 0xe2, 0x94, 0xb7, 0x2f, 0x57, + 0x65, 0xa5, 0x48, 0x62, 0xef, 0x1d, 0x8b, 0x3d, 0x73, 0x71, 0xec, 0xb7, 0xa2, 0xd8, 0xb7, 0x0f, + 0xec, 0x12, 0xf3, 0xe5, 0x6a, 0xa7, 0x89, 0x5d, 0x11, 0x24, 0x97, 0xcb, 0xb1, 0x43, 0x28, 0x7b, + 0x6d, 0x0a, 0x71, 0x01, 0xbc, 0x1a, 0xf6, 0xcb, 0xbf, 0x44, 0x1b, 0xcc, 0xed, 0x35, 0xa2, 0x1b, + 0x09, 0x2e, 0xf1, 0x9f, 0x2d, 0xa1, 0x42, 0x0d, 0xd8, 0xcd, 0x0d, 0xea, 0x76, 0x24, 0xad, 0x51, + 0x00, 0xc2, 0x28, 0x24, 0xa7, 0xd3, 0x9c, 0x43, 0xd9, 0x50, 0x3f, 0x43, 0xde, 0x88, 0x0d, 0xe7, + 0xce, 0x7c, 0x9f, 0x16, 0x78, 0xaf, 0xfe, 0x99, 0x56, 0x5d, 0xdc, 0x1d, 0x58, 0xc6, 0xde, 0xc0, + 0x32, 0xde, 0x0f, 0x2c, 0x63, 0xf3, 0xd0, 0x4a, 0xed, 0x1d, 0x5a, 0xa9, 0xb7, 0x87, 0x56, 0xea, + 0x71, 0x59, 0xd9, 0x06, 0x6f, 0x0d, 0xfb, 0xc2, 0xd9, 0xb8, 0xe8, 0x8a, 0x6c, 0x8e, 0xc4, 0xf2, + 0xff, 0x7f, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x08, 0x33, 0x56, 0xd8, 0xd3, 0x07, 0x00, 0x00, } func (this *MsgInitLockupAccount) Equal(that interface{}) bool { @@ -1002,96 +900,6 @@ func (m *MsgExecuteMessagesResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *MsgWithdraw) 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 *MsgWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denoms) > 0 { - for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Denoms[iNdEx]) - copy(dAtA[i:], m.Denoms[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denoms[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.ToAddress) > 0 { - i -= len(m.ToAddress) - copy(dAtA[i:], m.ToAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Withdrawer) > 0 { - i -= len(m.Withdrawer) - copy(dAtA[i:], m.Withdrawer) - i = encodeVarintTx(dAtA, i, uint64(len(m.Withdrawer))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgWithdrawResponse) 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 *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AmountReceived) > 0 { - for iNdEx := len(m.AmountReceived) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AmountReceived[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1252,48 +1060,6 @@ func (m *MsgExecuteMessagesResponse) Size() (n int) { return n } -func (m *MsgWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Withdrawer) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ToAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Denoms) > 0 { - for _, s := range m.Denoms { - l = len(s) - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgWithdrawResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.AmountReceived) > 0 { - for _, e := range m.AmountReceived { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2337,268 +2103,6 @@ func (m *MsgExecuteMessagesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdraw) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Withdrawer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountReceived", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AmountReceived = append(m.AmountReceived, types.Coin{}) - if err := m.AmountReceived[len(m.AmountReceived)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/lockup.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/lockup.proto index b8be23c4ae95..65338a1f441e 100644 --- a/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/lockup.proto +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/lockup.proto @@ -4,7 +4,9 @@ package cosmos.accounts.defaults.lockup.v1; import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; option go_package = "cosmossdk.io/x/accounts/defaults/lockup/v1"; @@ -20,3 +22,19 @@ message Period { (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } + +message UnbondingEntries { + repeated UnbondingEntry entries = 1; +} + +// UnbondingEntry defines an entry tracking the lockup account unbonding operation. +message UnbondingEntry { + int64 creation_height = 1; + // end time of entry + google.protobuf.Timestamp end_time = 2 + [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; + // unbond amount + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // validator address + string validator_address = 4 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/query.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/query.proto index e2bd5b607306..a5589ce3d9b4 100644 --- a/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/query.proto +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/query.proto @@ -5,6 +5,7 @@ import "cosmos/accounts/defaults/lockup/v1/lockup.proto"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "cosmossdk.io/x/accounts/defaults/lockup/v1"; @@ -43,6 +44,17 @@ message QueryLockupAccountInfoResponse { string owner = 8; } +// QueryUnbondingEntriesRequest is used to query the lockup account unbonding entries. +message QueryUnbondingEntriesRequest { + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; +} + +// QueryUnbondingEntriesResponse returns the lockup account unbonding entries. +message QueryUnbondingEntriesResponse { + // UnbondingEntry defines the list of unbonding entries. + repeated UnbondingEntry unbonding_entries = 1; +} + // QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. message QueryLockingPeriodsRequest {} @@ -51,3 +63,12 @@ message QueryLockingPeriodsResponse { // lockup_periods defines the value of the periodic lockup account locking periods. repeated Period locking_periods = 1; } + +// QuerySpendableAmountRequest is used to query the lockup account total spendable tokens. +message QuerySpendableAmountRequest {} + +// QuerySpendableAmountResponse returns lockup account total spendable tokens. +message QuerySpendableAmountResponse { + repeated cosmos.base.v1beta1.Coin spendable_tokens = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} diff --git a/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto index 980cc90c5307..11fb09726186 100644 --- a/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto +++ b/x/accounts/proto/cosmos/accounts/defaults/lockup/v1/tx.proto @@ -101,26 +101,3 @@ message MsgSend { message MsgExecuteMessagesResponse { repeated google.protobuf.Any responses = 1; } - -// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of -// choice -message MsgWithdraw { - option (cosmos.msg.v1.signer) = "withdrawer"; - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string withdrawer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated string denoms = 3; -} - -// MsgWithdrawResponse defines the response for MsgWithdraw -message MsgWithdrawResponse { - string receiver = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount_received = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} diff --git a/x/staking/keeper/grpc_query.go b/x/staking/keeper/grpc_query.go index 47dd44b95773..34929dbdfd24 100644 --- a/x/staking/keeper/grpc_query.go +++ b/x/staking/keeper/grpc_query.go @@ -302,10 +302,10 @@ func (k Querier) UnbondingDelegation(ctx context.Context, req *types.QueryUnbond unbond, err := k.GetUnbondingDelegation(ctx, delAddr, valAddr) if err != nil { - return nil, status.Errorf( + return nil, errorsmod.Wrap(err, status.Errorf( codes.NotFound, "unbonding delegation with delegator %s not found for validator %s", - req.DelegatorAddr, req.ValidatorAddr) + req.DelegatorAddr, req.ValidatorAddr).Error()) } return &types.QueryUnbondingDelegationResponse{Unbond: unbond}, nil