diff --git a/CHANGELOG.md b/CHANGELOG.md index 0856620122e..abb99a3f20d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ It is strongly recommended to upgrade to these releases as well. ### Improvements * [#12453](https://github.com/cosmos/cosmos-sdk/pull/12453) Add `NewInMemoryWithKeyring` function which allows the creation of in memory `keystore` instances with a specified set of existing items. +* [#11390](https://github.com/cosmos/cosmos-sdk/pull/11390) `LatestBlockResponse` & `BlockByHeightResponse` types' `Block` filed has been deprecated and they now contains new field `sdk_block` with `proposer_address` as `string` ### Bug Fixes diff --git a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go b/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go deleted file mode 100644 index 3d94c19622c..00000000000 --- a/api/cosmos/feegrant/v1beta1/feegrant.pulsar.go +++ /dev/null @@ -1,3042 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package feegrantv1beta1 - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_BasicAllowance_1_list)(nil) - -type _BasicAllowance_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_BasicAllowance_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BasicAllowance_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BasicAllowance_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_BasicAllowance_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BasicAllowance_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BasicAllowance_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BasicAllowance_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BasicAllowance_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_BasicAllowance protoreflect.MessageDescriptor - fd_BasicAllowance_spend_limit protoreflect.FieldDescriptor - fd_BasicAllowance_expiration protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_BasicAllowance = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("BasicAllowance") - fd_BasicAllowance_spend_limit = md_BasicAllowance.Fields().ByName("spend_limit") - fd_BasicAllowance_expiration = md_BasicAllowance.Fields().ByName("expiration") -} - -var _ protoreflect.Message = (*fastReflection_BasicAllowance)(nil) - -type fastReflection_BasicAllowance BasicAllowance - -func (x *BasicAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_BasicAllowance)(x) -} - -func (x *BasicAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_BasicAllowance_messageType fastReflection_BasicAllowance_messageType -var _ protoreflect.MessageType = fastReflection_BasicAllowance_messageType{} - -type fastReflection_BasicAllowance_messageType struct{} - -func (x fastReflection_BasicAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_BasicAllowance)(nil) -} -func (x fastReflection_BasicAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_BasicAllowance) -} -func (x fastReflection_BasicAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BasicAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_BasicAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_BasicAllowance -} - -// 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_BasicAllowance) Type() protoreflect.MessageType { - return _fastReflection_BasicAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_BasicAllowance) New() protoreflect.Message { - return new(fastReflection_BasicAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_BasicAllowance) Interface() protoreflect.ProtoMessage { - return (*BasicAllowance)(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_BasicAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.SpendLimit) != 0 { - value := protoreflect.ValueOfList(&_BasicAllowance_1_list{list: &x.SpendLimit}) - if !f(fd_BasicAllowance_spend_limit, value) { - return - } - } - if x.Expiration != nil { - value := protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - if !f(fd_BasicAllowance_expiration, 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_BasicAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - return len(x.SpendLimit) != 0 - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - return x.Expiration != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - x.SpendLimit = nil - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - x.Expiration = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - if len(x.SpendLimit) == 0 { - return protoreflect.ValueOfList(&_BasicAllowance_1_list{}) - } - listValue := &_BasicAllowance_1_list{list: &x.SpendLimit} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - value := x.Expiration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - lv := value.List() - clv := lv.(*_BasicAllowance_1_list) - x.SpendLimit = *clv.list - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - x.Expiration = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - if x.SpendLimit == nil { - x.SpendLimit = []*v1beta1.Coin{} - } - value := &_BasicAllowance_1_list{list: &x.SpendLimit} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - if x.Expiration == nil { - x.Expiration = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Expiration.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.BasicAllowance.spend_limit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_BasicAllowance_1_list{list: &list}) - case "cosmos.feegrant.v1beta1.BasicAllowance.expiration": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.BasicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.BasicAllowance 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_BasicAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.BasicAllowance", 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_BasicAllowance) 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_BasicAllowance) 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_BasicAllowance) 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_BasicAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BasicAllowance) - 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.SpendLimit) > 0 { - for _, e := range x.SpendLimit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Expiration != nil { - l = options.Size(x.Expiration) - 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().(*BasicAllowance) - 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 x.Expiration != nil { - encoded, err := options.Marshal(x.Expiration) - 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.SpendLimit) > 0 { - for iNdEx := len(x.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SpendLimit[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().(*BasicAllowance) - 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: BasicAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BasicAllowance: 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 SpendLimit", 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.SpendLimit = append(x.SpendLimit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SpendLimit[len(x.SpendLimit)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expiration", 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.Expiration == nil { - x.Expiration = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Expiration); 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 _ protoreflect.List = (*_PeriodicAllowance_3_list)(nil) - -type _PeriodicAllowance_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_PeriodicAllowance_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_PeriodicAllowance_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_PeriodicAllowance_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_PeriodicAllowance_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_PeriodicAllowance_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_PeriodicAllowance_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_PeriodicAllowance_4_list)(nil) - -type _PeriodicAllowance_4_list struct { - list *[]*v1beta1.Coin -} - -func (x *_PeriodicAllowance_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_PeriodicAllowance_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_PeriodicAllowance_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_PeriodicAllowance_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_PeriodicAllowance_4_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_PeriodicAllowance_4_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_PeriodicAllowance_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_PeriodicAllowance protoreflect.MessageDescriptor - fd_PeriodicAllowance_basic protoreflect.FieldDescriptor - fd_PeriodicAllowance_period protoreflect.FieldDescriptor - fd_PeriodicAllowance_period_spend_limit protoreflect.FieldDescriptor - fd_PeriodicAllowance_period_can_spend protoreflect.FieldDescriptor - fd_PeriodicAllowance_period_reset protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_PeriodicAllowance = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("PeriodicAllowance") - fd_PeriodicAllowance_basic = md_PeriodicAllowance.Fields().ByName("basic") - fd_PeriodicAllowance_period = md_PeriodicAllowance.Fields().ByName("period") - fd_PeriodicAllowance_period_spend_limit = md_PeriodicAllowance.Fields().ByName("period_spend_limit") - fd_PeriodicAllowance_period_can_spend = md_PeriodicAllowance.Fields().ByName("period_can_spend") - fd_PeriodicAllowance_period_reset = md_PeriodicAllowance.Fields().ByName("period_reset") -} - -var _ protoreflect.Message = (*fastReflection_PeriodicAllowance)(nil) - -type fastReflection_PeriodicAllowance PeriodicAllowance - -func (x *PeriodicAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_PeriodicAllowance)(x) -} - -func (x *PeriodicAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_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_PeriodicAllowance_messageType fastReflection_PeriodicAllowance_messageType -var _ protoreflect.MessageType = fastReflection_PeriodicAllowance_messageType{} - -type fastReflection_PeriodicAllowance_messageType struct{} - -func (x fastReflection_PeriodicAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_PeriodicAllowance)(nil) -} -func (x fastReflection_PeriodicAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_PeriodicAllowance) -} -func (x fastReflection_PeriodicAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PeriodicAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PeriodicAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_PeriodicAllowance -} - -// 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_PeriodicAllowance) Type() protoreflect.MessageType { - return _fastReflection_PeriodicAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PeriodicAllowance) New() protoreflect.Message { - return new(fastReflection_PeriodicAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PeriodicAllowance) Interface() protoreflect.ProtoMessage { - return (*PeriodicAllowance)(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_PeriodicAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Basic != nil { - value := protoreflect.ValueOfMessage(x.Basic.ProtoReflect()) - if !f(fd_PeriodicAllowance_basic, value) { - return - } - } - if x.Period != nil { - value := protoreflect.ValueOfMessage(x.Period.ProtoReflect()) - if !f(fd_PeriodicAllowance_period, value) { - return - } - } - if len(x.PeriodSpendLimit) != 0 { - value := protoreflect.ValueOfList(&_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit}) - if !f(fd_PeriodicAllowance_period_spend_limit, value) { - return - } - } - if len(x.PeriodCanSpend) != 0 { - value := protoreflect.ValueOfList(&_PeriodicAllowance_4_list{list: &x.PeriodCanSpend}) - if !f(fd_PeriodicAllowance_period_can_spend, value) { - return - } - } - if x.PeriodReset != nil { - value := protoreflect.ValueOfMessage(x.PeriodReset.ProtoReflect()) - if !f(fd_PeriodicAllowance_period_reset, 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_PeriodicAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - return x.Basic != nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - return x.Period != nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - return len(x.PeriodSpendLimit) != 0 - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - return len(x.PeriodCanSpend) != 0 - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - return x.PeriodReset != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - x.Basic = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - x.Period = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - x.PeriodSpendLimit = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - x.PeriodCanSpend = nil - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - x.PeriodReset = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - value := x.Basic - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - value := x.Period - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - if len(x.PeriodSpendLimit) == 0 { - return protoreflect.ValueOfList(&_PeriodicAllowance_3_list{}) - } - listValue := &_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - if len(x.PeriodCanSpend) == 0 { - return protoreflect.ValueOfList(&_PeriodicAllowance_4_list{}) - } - listValue := &_PeriodicAllowance_4_list{list: &x.PeriodCanSpend} - return protoreflect.ValueOfList(listValue) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - value := x.PeriodReset - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - x.Basic = value.Message().Interface().(*BasicAllowance) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - x.Period = value.Message().Interface().(*durationpb.Duration) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - lv := value.List() - clv := lv.(*_PeriodicAllowance_3_list) - x.PeriodSpendLimit = *clv.list - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - lv := value.List() - clv := lv.(*_PeriodicAllowance_4_list) - x.PeriodCanSpend = *clv.list - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - x.PeriodReset = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - if x.Basic == nil { - x.Basic = new(BasicAllowance) - } - return protoreflect.ValueOfMessage(x.Basic.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - if x.Period == nil { - x.Period = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.Period.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - if x.PeriodSpendLimit == nil { - x.PeriodSpendLimit = []*v1beta1.Coin{} - } - value := &_PeriodicAllowance_3_list{list: &x.PeriodSpendLimit} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - if x.PeriodCanSpend == nil { - x.PeriodCanSpend = []*v1beta1.Coin{} - } - value := &_PeriodicAllowance_4_list{list: &x.PeriodCanSpend} - return protoreflect.ValueOfList(value) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - if x.PeriodReset == nil { - x.PeriodReset = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.PeriodReset.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.PeriodicAllowance.basic": - m := new(BasicAllowance) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_PeriodicAllowance_3_list{list: &list}) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_PeriodicAllowance_4_list{list: &list}) - case "cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.PeriodicAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.PeriodicAllowance 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_PeriodicAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.PeriodicAllowance", 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_PeriodicAllowance) 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_PeriodicAllowance) 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_PeriodicAllowance) 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_PeriodicAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PeriodicAllowance) - 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.Basic != nil { - l = options.Size(x.Basic) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Period != nil { - l = options.Size(x.Period) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.PeriodSpendLimit) > 0 { - for _, e := range x.PeriodSpendLimit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.PeriodCanSpend) > 0 { - for _, e := range x.PeriodCanSpend { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.PeriodReset != nil { - l = options.Size(x.PeriodReset) - 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().(*PeriodicAllowance) - 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 x.PeriodReset != nil { - encoded, err := options.Marshal(x.PeriodReset) - 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] = 0x2a - } - if len(x.PeriodCanSpend) > 0 { - for iNdEx := len(x.PeriodCanSpend) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.PeriodCanSpend[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] = 0x22 - } - } - if len(x.PeriodSpendLimit) > 0 { - for iNdEx := len(x.PeriodSpendLimit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.PeriodSpendLimit[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.Period != nil { - encoded, err := options.Marshal(x.Period) - 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.Basic != nil { - encoded, err := options.Marshal(x.Basic) - 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().(*PeriodicAllowance) - 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: PeriodicAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PeriodicAllowance: 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 Basic", 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.Basic == nil { - x.Basic = &BasicAllowance{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Basic); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Period", 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.Period == nil { - x.Period = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Period); 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 PeriodSpendLimit", 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.PeriodSpendLimit = append(x.PeriodSpendLimit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodSpendLimit[len(x.PeriodSpendLimit)-1]); 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 PeriodCanSpend", 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.PeriodCanSpend = append(x.PeriodCanSpend, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodCanSpend[len(x.PeriodCanSpend)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeriodReset", 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.PeriodReset == nil { - x.PeriodReset = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PeriodReset); 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 _ protoreflect.List = (*_AllowedMsgAllowance_2_list)(nil) - -type _AllowedMsgAllowance_2_list struct { - list *[]string -} - -func (x *_AllowedMsgAllowance_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_AllowedMsgAllowance_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_AllowedMsgAllowance_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_AllowedMsgAllowance_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_AllowedMsgAllowance_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message AllowedMsgAllowance at list field AllowedMessages as it is not of Message kind")) -} - -func (x *_AllowedMsgAllowance_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_AllowedMsgAllowance_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_AllowedMsgAllowance_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_AllowedMsgAllowance protoreflect.MessageDescriptor - fd_AllowedMsgAllowance_allowance protoreflect.FieldDescriptor - fd_AllowedMsgAllowance_allowed_messages protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_AllowedMsgAllowance = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("AllowedMsgAllowance") - fd_AllowedMsgAllowance_allowance = md_AllowedMsgAllowance.Fields().ByName("allowance") - fd_AllowedMsgAllowance_allowed_messages = md_AllowedMsgAllowance.Fields().ByName("allowed_messages") -} - -var _ protoreflect.Message = (*fastReflection_AllowedMsgAllowance)(nil) - -type fastReflection_AllowedMsgAllowance AllowedMsgAllowance - -func (x *AllowedMsgAllowance) ProtoReflect() protoreflect.Message { - return (*fastReflection_AllowedMsgAllowance)(x) -} - -func (x *AllowedMsgAllowance) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_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_AllowedMsgAllowance_messageType fastReflection_AllowedMsgAllowance_messageType -var _ protoreflect.MessageType = fastReflection_AllowedMsgAllowance_messageType{} - -type fastReflection_AllowedMsgAllowance_messageType struct{} - -func (x fastReflection_AllowedMsgAllowance_messageType) Zero() protoreflect.Message { - return (*fastReflection_AllowedMsgAllowance)(nil) -} -func (x fastReflection_AllowedMsgAllowance_messageType) New() protoreflect.Message { - return new(fastReflection_AllowedMsgAllowance) -} -func (x fastReflection_AllowedMsgAllowance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AllowedMsgAllowance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AllowedMsgAllowance) Descriptor() protoreflect.MessageDescriptor { - return md_AllowedMsgAllowance -} - -// 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_AllowedMsgAllowance) Type() protoreflect.MessageType { - return _fastReflection_AllowedMsgAllowance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AllowedMsgAllowance) New() protoreflect.Message { - return new(fastReflection_AllowedMsgAllowance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AllowedMsgAllowance) Interface() protoreflect.ProtoMessage { - return (*AllowedMsgAllowance)(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_AllowedMsgAllowance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Allowance != nil { - value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - if !f(fd_AllowedMsgAllowance_allowance, value) { - return - } - } - if len(x.AllowedMessages) != 0 { - value := protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{list: &x.AllowedMessages}) - if !f(fd_AllowedMsgAllowance_allowed_messages, 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_AllowedMsgAllowance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - return x.Allowance != nil - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - return len(x.AllowedMessages) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - x.Allowance = nil - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - x.AllowedMessages = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - value := x.Allowance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - if len(x.AllowedMessages) == 0 { - return protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{}) - } - listValue := &_AllowedMsgAllowance_2_list{list: &x.AllowedMessages} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - x.Allowance = value.Message().Interface().(*anypb.Any) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - lv := value.List() - clv := lv.(*_AllowedMsgAllowance_2_list) - x.AllowedMessages = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - if x.Allowance == nil { - x.Allowance = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - if x.AllowedMessages == nil { - x.AllowedMessages = []string{} - } - value := &_AllowedMsgAllowance_2_list{list: &x.AllowedMessages} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowed_messages": - list := []string{} - return protoreflect.ValueOfList(&_AllowedMsgAllowance_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.AllowedMsgAllowance")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.AllowedMsgAllowance 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_AllowedMsgAllowance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.AllowedMsgAllowance", 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_AllowedMsgAllowance) 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_AllowedMsgAllowance) 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_AllowedMsgAllowance) 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_AllowedMsgAllowance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AllowedMsgAllowance) - 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.Allowance != nil { - l = options.Size(x.Allowance) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.AllowedMessages) > 0 { - for _, s := range x.AllowedMessages { - 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().(*AllowedMsgAllowance) - 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.AllowedMessages) > 0 { - for iNdEx := len(x.AllowedMessages) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.AllowedMessages[iNdEx]) - copy(dAtA[i:], x.AllowedMessages[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AllowedMessages[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if x.Allowance != nil { - encoded, err := options.Marshal(x.Allowance) - 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().(*AllowedMsgAllowance) - 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: AllowedMsgAllowance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllowedMsgAllowance: 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 Allowance", 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.Allowance == nil { - x.Allowance = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedMessages", 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.AllowedMessages = append(x.AllowedMessages, 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 ( - md_Grant protoreflect.MessageDescriptor - fd_Grant_granter protoreflect.FieldDescriptor - fd_Grant_grantee protoreflect.FieldDescriptor - fd_Grant_allowance protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_feegrant_v1beta1_feegrant_proto_init() - md_Grant = File_cosmos_feegrant_v1beta1_feegrant_proto.Messages().ByName("Grant") - fd_Grant_granter = md_Grant.Fields().ByName("granter") - fd_Grant_grantee = md_Grant.Fields().ByName("grantee") - fd_Grant_allowance = md_Grant.Fields().ByName("allowance") -} - -var _ protoreflect.Message = (*fastReflection_Grant)(nil) - -type fastReflection_Grant Grant - -func (x *Grant) ProtoReflect() protoreflect.Message { - return (*fastReflection_Grant)(x) -} - -func (x *Grant) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_feegrant_v1beta1_feegrant_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_Grant_messageType fastReflection_Grant_messageType -var _ protoreflect.MessageType = fastReflection_Grant_messageType{} - -type fastReflection_Grant_messageType struct{} - -func (x fastReflection_Grant_messageType) Zero() protoreflect.Message { - return (*fastReflection_Grant)(nil) -} -func (x fastReflection_Grant_messageType) New() protoreflect.Message { - return new(fastReflection_Grant) -} -func (x fastReflection_Grant_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Grant -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Grant) Descriptor() protoreflect.MessageDescriptor { - return md_Grant -} - -// 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_Grant) Type() protoreflect.MessageType { - return _fastReflection_Grant_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Grant) New() protoreflect.Message { - return new(fastReflection_Grant) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Grant) Interface() protoreflect.ProtoMessage { - return (*Grant)(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_Grant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_Grant_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_Grant_grantee, value) { - return - } - } - if x.Allowance != nil { - value := protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - if !f(fd_Grant_allowance, 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_Grant) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - return x.Granter != "" - case "cosmos.feegrant.v1beta1.Grant.grantee": - return x.Grantee != "" - case "cosmos.feegrant.v1beta1.Grant.allowance": - return x.Allowance != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - x.Granter = "" - case "cosmos.feegrant.v1beta1.Grant.grantee": - x.Grantee = "" - case "cosmos.feegrant.v1beta1.Grant.allowance": - x.Allowance = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.Grant.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - case "cosmos.feegrant.v1beta1.Grant.allowance": - value := x.Allowance - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - x.Granter = value.Interface().(string) - case "cosmos.feegrant.v1beta1.Grant.grantee": - x.Grantee = value.Interface().(string) - case "cosmos.feegrant.v1beta1.Grant.allowance": - x.Allowance = value.Message().Interface().(*anypb.Any) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.allowance": - if x.Allowance == nil { - x.Allowance = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Allowance.ProtoReflect()) - case "cosmos.feegrant.v1beta1.Grant.granter": - panic(fmt.Errorf("field granter of message cosmos.feegrant.v1beta1.Grant is not mutable")) - case "cosmos.feegrant.v1beta1.Grant.grantee": - panic(fmt.Errorf("field grantee of message cosmos.feegrant.v1beta1.Grant is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.feegrant.v1beta1.Grant.granter": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.Grant.grantee": - return protoreflect.ValueOfString("") - case "cosmos.feegrant.v1beta1.Grant.allowance": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.feegrant.v1beta1.Grant")) - } - panic(fmt.Errorf("message cosmos.feegrant.v1beta1.Grant 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_Grant) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.feegrant.v1beta1.Grant", 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_Grant) 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_Grant) 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_Grant) 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_Grant) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Grant) - 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.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Allowance != nil { - l = options.Size(x.Allowance) - 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().(*Grant) - 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 x.Allowance != nil { - encoded, err := options.Marshal(x.Allowance) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*Grant) - 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: Grant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Grant: 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 Granter", 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.Granter = 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 Grantee", 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.Grantee = 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 Allowance", 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.Allowance == nil { - x.Allowance = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Allowance); 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, - } -} - -// Since: cosmos-sdk 0.43 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/feegrant/v1beta1/feegrant.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// BasicAllowance implements Allowance with a one-time grant of coins -// that optionally expires. The grantee can use up to SpendLimit to cover fees. -type BasicAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // spend_limit specifies the maximum amount of coins that can be spent - // by this allowance and will be updated as coins are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - SpendLimit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3" json:"spend_limit,omitempty"` - // expiration specifies an optional time when this allowance expires - Expiration *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` -} - -func (x *BasicAllowance) Reset() { - *x = BasicAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BasicAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BasicAllowance) ProtoMessage() {} - -// Deprecated: Use BasicAllowance.ProtoReflect.Descriptor instead. -func (*BasicAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{0} -} - -func (x *BasicAllowance) GetSpendLimit() []*v1beta1.Coin { - if x != nil { - return x.SpendLimit - } - return nil -} - -func (x *BasicAllowance) GetExpiration() *timestamppb.Timestamp { - if x != nil { - return x.Expiration - } - return nil -} - -// PeriodicAllowance extends Allowance to allow for both a maximum cap, -// as well as a limit per time period. -type PeriodicAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // basic specifies a struct of `BasicAllowance` - Basic *BasicAllowance `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic,omitempty"` - // period specifies the time duration in which period_spend_limit coins can - // be spent before that allowance is reset - Period *durationpb.Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period,omitempty"` - // period_spend_limit specifies the maximum number of coins that can be spent - // in the period - PeriodSpendLimit []*v1beta1.Coin `protobuf:"bytes,3,rep,name=period_spend_limit,json=periodSpendLimit,proto3" json:"period_spend_limit,omitempty"` - // period_can_spend is the number of coins left to be spent before the period_reset time - PeriodCanSpend []*v1beta1.Coin `protobuf:"bytes,4,rep,name=period_can_spend,json=periodCanSpend,proto3" json:"period_can_spend,omitempty"` - // period_reset is the time at which this period resets and a new one begins, - // it is calculated from the start time of the first transaction after the - // last period ended - PeriodReset *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=period_reset,json=periodReset,proto3" json:"period_reset,omitempty"` -} - -func (x *PeriodicAllowance) Reset() { - *x = PeriodicAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeriodicAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeriodicAllowance) ProtoMessage() {} - -// Deprecated: Use PeriodicAllowance.ProtoReflect.Descriptor instead. -func (*PeriodicAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{1} -} - -func (x *PeriodicAllowance) GetBasic() *BasicAllowance { - if x != nil { - return x.Basic - } - return nil -} - -func (x *PeriodicAllowance) GetPeriod() *durationpb.Duration { - if x != nil { - return x.Period - } - return nil -} - -func (x *PeriodicAllowance) GetPeriodSpendLimit() []*v1beta1.Coin { - if x != nil { - return x.PeriodSpendLimit - } - return nil -} - -func (x *PeriodicAllowance) GetPeriodCanSpend() []*v1beta1.Coin { - if x != nil { - return x.PeriodCanSpend - } - return nil -} - -func (x *PeriodicAllowance) GetPeriodReset() *timestamppb.Timestamp { - if x != nil { - return x.PeriodReset - } - return nil -} - -// AllowedMsgAllowance creates allowance only for specified message types. -type AllowedMsgAllowance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // allowance can be any of basic and periodic fee allowance. - Allowance *anypb.Any `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` - // allowed_messages are the messages for which the grantee has the access. - AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"` -} - -func (x *AllowedMsgAllowance) Reset() { - *x = AllowedMsgAllowance{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AllowedMsgAllowance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AllowedMsgAllowance) ProtoMessage() {} - -// Deprecated: Use AllowedMsgAllowance.ProtoReflect.Descriptor instead. -func (*AllowedMsgAllowance) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{2} -} - -func (x *AllowedMsgAllowance) GetAllowance() *anypb.Any { - if x != nil { - return x.Allowance - } - return nil -} - -func (x *AllowedMsgAllowance) GetAllowedMessages() []string { - if x != nil { - return x.AllowedMessages - } - return nil -} - -// Grant is stored in the KVStore to record a grant with full context -type Grant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // granter is the address of the user granting an allowance of their funds. - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is the address of the user being granted an allowance of another user's funds. - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - // allowance can be any of basic, periodic, allowed fee allowance. - Allowance *anypb.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` -} - -func (x *Grant) Reset() { - *x = Grant{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Grant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Grant) ProtoMessage() {} - -// Deprecated: Use Grant.ProtoReflect.Descriptor instead. -func (*Grant) Descriptor() ([]byte, []int) { - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP(), []int{3} -} - -func (x *Grant) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *Grant) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -func (x *Grant) GetAllowance() *anypb.Any { - if x != nil { - return x.Allowance - } - return nil -} - -var File_cosmos_feegrant_v1beta1_feegrant_proto protoreflect.FileDescriptor - -var file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0xd3, - 0x01, 0x0a, 0x0e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, - 0x65, 0x12, 0x6c, 0x0a, 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x40, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, - 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x3a, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, - 0x6e, 0x63, 0x65, 0x49, 0x22, 0xe3, 0x03, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, - 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x62, 0x61, - 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, - 0x3b, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 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, 0x08, 0xc8, 0xde, 0x1f, 0x00, - 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x79, 0x0a, 0x12, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 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, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x70, 0x65, - 0x6e, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x75, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x04, 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, 0x0e, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x43, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x47, - 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 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, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, 0x65, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x11, 0xca, 0xb4, 0x2d, - 0x0d, 0x46, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x3a, 0x15, 0x88, 0xa0, 0x1f, 0x00, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, - 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x22, 0xb6, 0x01, 0x0a, 0x05, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 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, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x65, 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, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x45, 0x0a, - 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x11, 0xca, 0xb4, 0x2d, 0x0d, 0x46, 0x65, 0x65, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x61, 0x6e, 0x63, 0x65, 0x42, 0xe4, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0d, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x66, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x46, - 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescOnce sync.Once - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData = file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc -) - -func file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescGZIP() []byte { - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescOnce.Do(func() { - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData) - }) - return file_cosmos_feegrant_v1beta1_feegrant_proto_rawDescData -} - -var file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes = []interface{}{ - (*BasicAllowance)(nil), // 0: cosmos.feegrant.v1beta1.BasicAllowance - (*PeriodicAllowance)(nil), // 1: cosmos.feegrant.v1beta1.PeriodicAllowance - (*AllowedMsgAllowance)(nil), // 2: cosmos.feegrant.v1beta1.AllowedMsgAllowance - (*Grant)(nil), // 3: cosmos.feegrant.v1beta1.Grant - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (*anypb.Any)(nil), // 7: google.protobuf.Any -} -var file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs = []int32{ - 4, // 0: cosmos.feegrant.v1beta1.BasicAllowance.spend_limit:type_name -> cosmos.base.v1beta1.Coin - 5, // 1: cosmos.feegrant.v1beta1.BasicAllowance.expiration:type_name -> google.protobuf.Timestamp - 0, // 2: cosmos.feegrant.v1beta1.PeriodicAllowance.basic:type_name -> cosmos.feegrant.v1beta1.BasicAllowance - 6, // 3: cosmos.feegrant.v1beta1.PeriodicAllowance.period:type_name -> google.protobuf.Duration - 4, // 4: cosmos.feegrant.v1beta1.PeriodicAllowance.period_spend_limit:type_name -> cosmos.base.v1beta1.Coin - 4, // 5: cosmos.feegrant.v1beta1.PeriodicAllowance.period_can_spend:type_name -> cosmos.base.v1beta1.Coin - 5, // 6: cosmos.feegrant.v1beta1.PeriodicAllowance.period_reset:type_name -> google.protobuf.Timestamp - 7, // 7: cosmos.feegrant.v1beta1.AllowedMsgAllowance.allowance:type_name -> google.protobuf.Any - 7, // 8: cosmos.feegrant.v1beta1.Grant.allowance:type_name -> google.protobuf.Any - 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 -} - -func init() { file_cosmos_feegrant_v1beta1_feegrant_proto_init() } -func file_cosmos_feegrant_v1beta1_feegrant_proto_init() { - if File_cosmos_feegrant_v1beta1_feegrant_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BasicAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeriodicAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AllowedMsgAllowance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Grant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes, - DependencyIndexes: file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs, - MessageInfos: file_cosmos_feegrant_v1beta1_feegrant_proto_msgTypes, - }.Build() - File_cosmos_feegrant_v1beta1_feegrant_proto = out.File - file_cosmos_feegrant_v1beta1_feegrant_proto_rawDesc = nil - file_cosmos_feegrant_v1beta1_feegrant_proto_goTypes = nil - file_cosmos_feegrant_v1beta1_feegrant_proto_depIdxs = nil -} diff --git a/client/grpc/cmtservice/query.pb.go b/client/grpc/cmtservice/query.pb.go index 6f4154d9c00..1a360928d4f 100644 --- a/client/grpc/cmtservice/query.pb.go +++ b/client/grpc/cmtservice/query.pb.go @@ -382,10 +382,11 @@ func (m *GetBlockByHeightRequest) GetHeight() int64 { // GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight // RPC method. type GetBlockByHeightResponse struct { - BlockId *v1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // Deprecated: please use `sdk_block` instead - Block *v1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` + Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Since: cosmos-sdk 0.47 + SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` } func (m *GetBlockByHeightResponse) Reset() { *m = GetBlockByHeightResponse{} } @@ -435,6 +436,13 @@ func (m *GetBlockByHeightResponse) GetBlock() *v1.Block { return nil } +func (m *GetBlockByHeightResponse) GetSdkBlock() *Block { + if m != nil { + return m.SdkBlock + } + return nil +} + // GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC // method. type GetLatestBlockRequest struct { @@ -476,10 +484,11 @@ var xxx_messageInfo_GetLatestBlockRequest proto.InternalMessageInfo // GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC // method. type GetLatestBlockResponse struct { - BlockId *v1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` // Deprecated: please use `sdk_block` instead - Block *v1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` + Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Since: cosmos-sdk 0.47 + SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` } func (m *GetLatestBlockResponse) Reset() { *m = GetLatestBlockResponse{} } @@ -1198,92 +1207,94 @@ func init() { } var fileDescriptor_40c93fb3ef485c5d = []byte{ - // 1352 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x69, 0x6c, 0x3f, 0x17, 0x48, 0xa6, 0xa1, 0x75, 0xad, 0xd4, 0x2d, 0x7b, 0x68, - 0xd3, 0x8f, 0xec, 0x62, 0xf7, 0xf3, 0x50, 0x5a, 0x35, 0x6d, 0x49, 0x43, 0x4b, 0x09, 0x1b, 0xc4, - 0x01, 0x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 0xec, 0x4e, 0x37, 0xc4, 0x11, 0xb7, 0x83, 0x98, 0x76, 0x6c, - 0xde, 0x63, 0x6a, 0xe6, 0xb6, 0xe7, 0xe4, 0x8b, 0xfe, 0xec, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x28, 0xc0, 0xa3, 0x18, 0x0e, 0x10, 0x00, 0x00, + // 1382 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xcf, 0xda, 0x69, 0x6c, 0x3f, 0xee, 0xff, 0x4f, 0x32, 0x0d, 0xad, 0x63, 0xa5, 0x6e, 0x59, + 0x89, 0x36, 0x7d, 0xc9, 0x2e, 0x76, 0x5f, 0x0f, 0xa5, 0x55, 0xdd, 0x96, 0x34, 0xb4, 0x94, 0xb0, + 0x41, 0x1c, 0x10, 0xd2, 0x6a, 0xed, 0x9d, 0x6c, 0x56, 0xb1, 0x77, 0xa6, 0x3b, 0x63, 0x83, 0x85, + 0x90, 0x10, 0x1f, 0x00, 0x21, 0xf1, 0x15, 0x7a, 0x80, 0x13, 0x17, 0xc4, 0xb1, 0x02, 0x71, 0xe9, + 0xb1, 0x2a, 0x12, 0xaa, 0x38, 0x20, 0xd4, 0xf2, 0x41, 0xd0, 0xbc, 0xac, 0xbd, 0xdb, 0x26, 0xb5, + 0x9d, 0x5b, 0x4f, 0x9e, 0x7d, 0x5e, 0x7f, 0xbf, 0xe7, 0x99, 0x79, 0x66, 0x0c, 0xa7, 0xdb, 0x84, + 0x75, 0x09, 0xb3, 0x5b, 0x1e, 0xc3, 0x36, 0xc7, 0x91, 0x8f, 0xe3, 0x6e, 0x18, 0x71, 0xbb, 0x5f, + 0x6f, 0x61, 0xee, 0xd5, 0xed, 0xfb, 0x3d, 0x1c, 0x0f, 0x2c, 0x1a, 0x13, 0x4e, 0x50, 0x4d, 0xd9, + 0x5a, 0xc2, 0xd6, 0x1a, 0xd9, 0x5a, 0xda, 0xb6, 0xba, 0x18, 0x90, 0x80, 0x48, 0x53, 0x5b, 0xac, + 0x94, 0x57, 0x75, 0x29, 0x20, 0x24, 0xe8, 0x60, 0x5b, 0x7e, 0xb5, 0x7a, 0x5b, 0xb6, 0x17, 0xe9, + 0x80, 0xd5, 0x65, 0xad, 0xf2, 0x68, 0x68, 0x7b, 0x51, 0x44, 0xb8, 0xc7, 0x43, 0x12, 0x31, 0xad, + 0xad, 0xa6, 0xe0, 0xd0, 0x06, 0xb5, 0xf9, 0x80, 0xe2, 0x44, 0xb7, 0x9c, 0xd2, 0x49, 0x79, 0x46, + 0x9b, 0x21, 0x25, 0x19, 0x0c, 0xf9, 0x50, 0x2f, 0x08, 0x23, 0x99, 0x66, 0x37, 0xdb, 0x5d, 0x0a, + 0x90, 0x8e, 0xbb, 0xa4, 0x6c, 0x5d, 0xc5, 0x51, 0x57, 0x63, 0x2f, 0x40, 0xad, 0x0e, 0x69, 0xef, + 0x28, 0xad, 0xf9, 0xb5, 0x01, 0xb5, 0x35, 0xcc, 0x3f, 0xf1, 0x3a, 0xa1, 0xef, 0x71, 0x12, 0x6f, + 0x62, 0xde, 0x1c, 0xdc, 0xc6, 0x61, 0xb0, 0xcd, 0x1d, 0x7c, 0xbf, 0x87, 0x19, 0x47, 0x87, 0x61, + 0x6e, 0x5b, 0x0a, 0x2a, 0xc6, 0x71, 0x63, 0x25, 0xef, 0xe8, 0x2f, 0xf4, 0x1e, 0xc0, 0x08, 0x73, + 0x25, 0x77, 0xdc, 0x58, 0x29, 0x37, 0x4e, 0x58, 0xe9, 0x4e, 0xa8, 0x16, 0x69, 0xbc, 0xd6, 0x86, + 0x17, 0x60, 0x1d, 0xd3, 0x49, 0x79, 0x9a, 0x4f, 0x0d, 0x38, 0xb6, 0x27, 0x04, 0x46, 0x49, 0xc4, + 0x30, 0x7a, 0x0b, 0x0e, 0x4a, 0xd4, 0x6e, 0x06, 0x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 0x5d, 0xf9, 0xcb, 0x90, 0x8f, 0xc4, 0xdd, 0xfe, 0x00, 0xa1, + 0xab, 0x13, 0x00, 0x7b, 0xc5, 0x9f, 0xb7, 0xea, 0xb5, 0x7d, 0xfb, 0x6b, 0x6a, 0x57, 0x25, 0xb5, + 0xcb, 0xe8, 0xe2, 0x74, 0xd4, 0x86, 0x1d, 0x7b, 0x60, 0x40, 0x69, 0x78, 0x5b, 0xa0, 0x77, 0xc6, + 0xc1, 0x79, 0xf1, 0x0e, 0xab, 0xd6, 0xa7, 0xf0, 0xd0, 0x90, 0x1b, 0x12, 0xf2, 0x59, 0x74, 0x7a, + 0x1c, 0x64, 0xaf, 0xd5, 0x0e, 0x5d, 0xf9, 0x4f, 0xa4, 0x79, 0xf7, 0xd1, 0xb3, 0x9a, 0xf1, 0xf8, + 0x59, 0xcd, 0xf8, 0xe7, 0x59, 0xcd, 0xf8, 0xee, 0x79, 0x6d, 0xe6, 0xf1, 0xf3, 0xda, 0xcc, 0xd3, + 0xe7, 0xb5, 0x99, 0x4f, 0x1b, 0x41, 0xc8, 0xb7, 0x7b, 0x2d, 0xab, 0x4d, 0xba, 0x49, 0x3c, 0xf5, + 0xb3, 0xca, 0xfc, 0x1d, 0xbb, 0xdd, 0x09, 0x71, 0xc4, 0xed, 0x20, 0xa6, 0x6d, 0x9b, 0x77, 0x99, + 0x9a, 0xb9, 0xad, 0x39, 0xf9, 0xdf, 0xe2, 0xdc, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0x18, + 0x32, 0x53, 0xc4, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/client/grpc/cmtservice/service.go b/client/grpc/cmtservice/service.go index 422ac469da1..0fa02554da5 100644 --- a/client/grpc/cmtservice/service.go +++ b/client/grpc/cmtservice/service.go @@ -77,7 +77,7 @@ func (s queryServer) GetLatestBlock(ctx context.Context, _ *GetLatestBlockReques return &GetLatestBlockResponse{ BlockId: &protoBlockID, Block: protoBlock, - SdkBlock: sdkBlock, + SdkBlock: convertBlock(protoBlock), }, nil } @@ -100,7 +100,7 @@ func (s queryServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeight return &GetBlockByHeightResponse{ BlockId: &protoBlockID, Block: protoBlock, - SdkBlock: sdkBlock, + SdkBlock: convertBlock(protoBlock), }, nil } diff --git a/client/grpc/cmtservice/types.pb.go b/client/grpc/cmtservice/types.pb.go deleted file mode 100644 index 6d1a3cbb607..00000000000 --- a/client/grpc/cmtservice/types.pb.go +++ /dev/null @@ -1,1371 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/base/tendermint/v1beta1/types.proto - -package cmtservice - -import ( - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" - v11 "github.com/cometbft/cometbft/api/cometbft/version/v1" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Block is tendermint type Block, with the Header proposer address -// field converted to bech32 string. -type Block struct { - Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` - Data v1.Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` - Evidence v1.EvidenceList `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"` - LastCommit *v1.Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` -} - -func (m *Block) Reset() { *m = Block{} } -func (m *Block) String() string { return proto.CompactTextString(m) } -func (*Block) ProtoMessage() {} -func (*Block) Descriptor() ([]byte, []int) { - return fileDescriptor_bb9931519c08e0d6, []int{0} -} -func (m *Block) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Block.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 *Block) XXX_Merge(src proto.Message) { - xxx_messageInfo_Block.Merge(m, src) -} -func (m *Block) XXX_Size() int { - return m.Size() -} -func (m *Block) XXX_DiscardUnknown() { - xxx_messageInfo_Block.DiscardUnknown(m) -} - -var xxx_messageInfo_Block proto.InternalMessageInfo - -func (m *Block) GetHeader() Header { - if m != nil { - return m.Header - } - return Header{} -} - -func (m *Block) GetData() v1.Data { - if m != nil { - return m.Data - } - return v1.Data{} -} - -func (m *Block) GetEvidence() v1.EvidenceList { - if m != nil { - return m.Evidence - } - return v1.EvidenceList{} -} - -func (m *Block) GetLastCommit() *v1.Commit { - if m != nil { - return m.LastCommit - } - return nil -} - -// Header defines the structure of a Tendermint block header. -type Header struct { - // basic block info - Version v11.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` - ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` - // prev block info - LastBlockId v1.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` - // hashes of block data - LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` - DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` - // hashes from the app output from the prev block - ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` - ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` - AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` - // consensus info - EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` - // proposer_address is the original block proposer address, formatted as a Bech32 string. - // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string - // for better UX. - ProposerAddress string `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` -} - -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_bb9931519c08e0d6, []int{1} -} -func (m *Header) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Header.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 *Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_Header.Merge(m, src) -} -func (m *Header) XXX_Size() int { - return m.Size() -} -func (m *Header) XXX_DiscardUnknown() { - xxx_messageInfo_Header.DiscardUnknown(m) -} - -var xxx_messageInfo_Header proto.InternalMessageInfo - -func (m *Header) GetVersion() v11.Consensus { - if m != nil { - return m.Version - } - return v11.Consensus{} -} - -func (m *Header) GetChainID() string { - if m != nil { - return m.ChainID - } - return "" -} - -func (m *Header) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *Header) GetTime() time.Time { - if m != nil { - return m.Time - } - return time.Time{} -} - -func (m *Header) GetLastBlockId() v1.BlockID { - if m != nil { - return m.LastBlockId - } - return v1.BlockID{} -} - -func (m *Header) GetLastCommitHash() []byte { - if m != nil { - return m.LastCommitHash - } - return nil -} - -func (m *Header) GetDataHash() []byte { - if m != nil { - return m.DataHash - } - return nil -} - -func (m *Header) GetValidatorsHash() []byte { - if m != nil { - return m.ValidatorsHash - } - return nil -} - -func (m *Header) GetNextValidatorsHash() []byte { - if m != nil { - return m.NextValidatorsHash - } - return nil -} - -func (m *Header) GetConsensusHash() []byte { - if m != nil { - return m.ConsensusHash - } - return nil -} - -func (m *Header) GetAppHash() []byte { - if m != nil { - return m.AppHash - } - return nil -} - -func (m *Header) GetLastResultsHash() []byte { - if m != nil { - return m.LastResultsHash - } - return nil -} - -func (m *Header) GetEvidenceHash() []byte { - if m != nil { - return m.EvidenceHash - } - return nil -} - -func (m *Header) GetProposerAddress() string { - if m != nil { - return m.ProposerAddress - } - return "" -} - -func init() { - proto.RegisterType((*Block)(nil), "cosmos.base.tendermint.v1beta1.Block") - proto.RegisterType((*Header)(nil), "cosmos.base.tendermint.v1beta1.Header") -} - -func init() { - proto.RegisterFile("cosmos/base/tendermint/v1beta1/types.proto", fileDescriptor_bb9931519c08e0d6) -} - -var fileDescriptor_bb9931519c08e0d6 = []byte{ - // 654 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0x86, 0xe3, 0x36, 0xcd, 0x65, 0xd2, 0xf4, 0x62, 0x55, 0x90, 0x06, 0xe1, 0x54, 0x45, 0x94, - 0x52, 0x09, 0x0f, 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, 0x38, 0x9f, 0x38, 0xd6, 0xc5, 0xc4, 0xb1, 0x7e, 0x4f, 0x1c, 0xeb, - 0xec, 0xca, 0xa9, 0x5c, 0x5c, 0x39, 0x95, 0x9f, 0x57, 0x4e, 0xe5, 0xf3, 0x41, 0xc4, 0x64, 0x3c, - 0xf6, 0xd5, 0xce, 0xb0, 0xf9, 0x9f, 0xd2, 0x5f, 0xcf, 0x44, 0x78, 0x8a, 0x83, 0x11, 0xa3, 0xa9, - 0xc4, 0x51, 0x9e, 0x05, 0x38, 0x48, 0xa4, 0xa0, 0x79, 0xc1, 0x02, 0xea, 0xd7, 0xe0, 0x8a, 0x1c, - 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x71, 0x63, 0x17, 0x59, 0xda, 0x04, 0x00, 0x00, -} - -func (m *Block) 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 *Block) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastCommit != nil { - { - size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Header) 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 *Header) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x72 - } - if len(m.EvidenceHash) > 0 { - i -= len(m.EvidenceHash) - copy(dAtA[i:], m.EvidenceHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) - i-- - dAtA[i] = 0x6a - } - if len(m.LastResultsHash) > 0 { - i -= len(m.LastResultsHash) - copy(dAtA[i:], m.LastResultsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) - i-- - dAtA[i] = 0x62 - } - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x5a - } - if len(m.ConsensusHash) > 0 { - i -= len(m.ConsensusHash) - copy(dAtA[i:], m.ConsensusHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) - i-- - dAtA[i] = 0x52 - } - if len(m.NextValidatorsHash) > 0 { - i -= len(m.NextValidatorsHash) - copy(dAtA[i:], m.NextValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) - i-- - dAtA[i] = 0x4a - } - if len(m.ValidatorsHash) > 0 { - i -= len(m.ValidatorsHash) - copy(dAtA[i:], m.ValidatorsHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) - i-- - dAtA[i] = 0x42 - } - if len(m.DataHash) > 0 { - i -= len(m.DataHash) - copy(dAtA[i:], m.DataHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) - i-- - dAtA[i] = 0x3a - } - if len(m.LastCommitHash) > 0 { - i -= len(m.LastCommitHash) - copy(dAtA[i:], m.LastCommitHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) - i-- - dAtA[i] = 0x32 - } - { - size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintTypes(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0x22 - if m.Height != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 - } - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Block) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Header.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Data.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Evidence.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.LastCommit != nil { - l = m.LastCommit.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Header) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Version.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTypes(uint64(m.Height)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) - n += 1 + l + sovTypes(uint64(l)) - l = m.LastBlockId.Size() - n += 1 + l + sovTypes(uint64(l)) - l = len(m.LastCommitHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DataHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.NextValidatorsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ConsensusHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.LastResultsHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.EvidenceHash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.ProposerAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Block) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Block: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastCommit == nil { - m.LastCommit = &v1.Commit{} - } - if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Header) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Header: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastCommitHash == nil { - m.LastCommitHash = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) - if m.DataHash == nil { - m.DataHash = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorsHash == nil { - m.ValidatorsHash = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.NextValidatorsHash == nil { - m.NextValidatorsHash = []byte{} - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) - if m.ConsensusHash == nil { - m.ConsensusHash = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) - if m.LastResultsHash == nil { - m.LastResultsHash = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) - if m.EvidenceHash == nil { - m.EvidenceHash = []byte{} - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/client/grpc/cmtservice/util.go b/client/grpc/cmtservice/util.go deleted file mode 100644 index 22c939fa8aa..00000000000 --- a/client/grpc/cmtservice/util.go +++ /dev/null @@ -1,47 +0,0 @@ -package cmtservice - -import ( - cmtprototypes "github.com/cometbft/cometbft/api/cometbft/types/v1" - - "cosmossdk.io/core/address" -) - -// convertHeader converts CometBFT header to sdk header -func convertHeader(h cmtprototypes.Header, ac address.Codec) (Header, error) { - proposerAddr, err := ac.BytesToString(h.ProposerAddress) - if err != nil { - return Header{}, err - } - - return Header{ - Version: h.Version, - ChainID: h.ChainID, - Height: h.Height, - Time: h.Time, - LastBlockId: h.LastBlockId, - ValidatorsHash: h.ValidatorsHash, - NextValidatorsHash: h.NextValidatorsHash, - ConsensusHash: h.ConsensusHash, - AppHash: h.AppHash, - DataHash: h.DataHash, - EvidenceHash: h.EvidenceHash, - LastResultsHash: h.LastResultsHash, - LastCommitHash: h.LastCommitHash, - ProposerAddress: proposerAddr, - }, nil -} - -// convertBlock converts CometBFT block to sdk block -func convertBlock(cmtblock *cmtprototypes.Block, ac address.Codec) (*Block, error) { - b := new(Block) - var err error - b.Header, err = convertHeader(cmtblock.Header, ac) - if err != nil { - return nil, err - } - b.LastCommit = cmtblock.LastCommit - b.Data = cmtblock.Data - b.Evidence = cmtblock.Evidence - - return b, nil -} diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto index feb25fb357c..f21e601bc75 100644 --- a/proto/cosmos/base/tendermint/v1beta1/query.proto +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -4,14 +4,12 @@ package cosmos.base.tendermint.v1beta1; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; -import "cometbft/p2p/v1/types.proto"; -import "cometbft/types/v1/types.proto"; +import "tendermint/p2p/types.proto"; +import "tendermint/types/types.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "cosmos/base/tendermint/v1beta1/types.proto"; import "cosmos_proto/cosmos.proto"; -import "cometbft/types/v1/block.proto"; -import "cometbft/crypto/v1/proof.proto"; -import "amino/amino.proto"; +import "tendermint/types/block.proto"; option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice"; @@ -115,12 +113,13 @@ message GetBlockByHeightRequest { // GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight // RPC method. message GetBlockByHeightResponse { - .cometbft.types.v1.BlockID block_id = 1; + .tendermint.types.BlockID block_id = 1; // Deprecated: please use `sdk_block` instead - .cometbft.types.v1.Block block = 2; + .tendermint.types.Block block = 2; - Block sdk_block = 3 [(cosmos_proto.field_added_in) = "cosmos-sdk 0.47"]; + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } // GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC @@ -130,12 +129,13 @@ message GetLatestBlockRequest {} // GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC // method. message GetLatestBlockResponse { - .cometbft.types.v1.BlockID block_id = 1; + .tendermint.types.BlockID block_id = 1; // Deprecated: please use `sdk_block` instead - .cometbft.types.v1.Block block = 2; + .tendermint.types.Block block = 2; - Block sdk_block = 3 [(cosmos_proto.field_added_in) = "cosmos-sdk 0.47"]; + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } // GetSyncingRequest is the request type for the Query/GetSyncing RPC method. @@ -196,16 +196,14 @@ message ABCIQueryResponse { uint32 code = 1; // Deprecated: use "value" instead reserved 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - // deprecated in favor of comet proof type - reserved 8; - int64 height = 9; - string codespace = 10; - .cometbft.crypto.v1.ProofOps proof_ops = 11; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 index = 5; + bytes key = 6; + bytes value = 7; + ProofOps proof_ops = 8; + int64 height = 9; + string codespace = 10; } // ProofOp defines an operation used for calculating Merkle root. The data could diff --git a/proto/cosmos/base/tendermint/v1beta1/types.proto b/proto/cosmos/base/tendermint/v1beta1/types.proto index ba1748abbd1..9127b5f1084 100644 --- a/proto/cosmos/base/tendermint/v1beta1/types.proto +++ b/proto/cosmos/base/tendermint/v1beta1/types.proto @@ -2,34 +2,32 @@ syntax = "proto3"; package cosmos.base.tendermint.v1beta1; import "gogoproto/gogo.proto"; -import "cometbft/types/v1/types.proto"; -import "cometbft/types/v1/evidence.proto"; -import "cometbft/version/v1/types.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/evidence.proto"; +import "tendermint/version/types.proto"; import "google/protobuf/timestamp.proto"; -import "amino/amino.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice"; +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; // Block is tendermint type Block, with the Header proposer address // field converted to bech32 string. message Block { - Header header = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - .cometbft.types.v1.Data data = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - .cometbft.types.v1.EvidenceList evidence = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - .cometbft.types.v1.Commit last_commit = 4; + Header header = 1 [(gogoproto.nullable) = false]; + .tendermint.types.Data data = 2 [(gogoproto.nullable) = false]; + .tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; + .tendermint.types.Commit last_commit = 4; } // Header defines the structure of a Tendermint block header. message Header { // basic block info - .cometbft.version.v1.Consensus version = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; + .tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // prev block info - .cometbft.types.v1.BlockID last_block_id = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + .tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data bytes last_commit_hash = 6; // commit from validators from the last block @@ -43,7 +41,7 @@ message Header { bytes last_results_hash = 12; // root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 13; // evidence included in the block + bytes evidence_hash = 13; // evidence included in the block // proposer_address is the original block proposer address, formatted as a Bech32 string. // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string diff --git a/tests/e2e/client/grpc/cmtservice/service_test.go b/tests/e2e/client/grpc/cmtservice/service_test.go index 783e27098b5..d0e569156a7 100644 --- a/tests/e2e/client/grpc/cmtservice/service_test.go +++ b/tests/e2e/client/grpc/cmtservice/service_test.go @@ -18,6 +18,8 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/network" + "github.com/cosmos/cosmos-sdk/testutil/rest" + "github.com/cosmos/cosmos-sdk/types" qtypes "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/version" ) @@ -55,8 +57,8 @@ func (s *E2ETestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *E2ETestSuite) TestQueryNodeInfo() { - val := s.network.GetValidators()[0] +func (s *IntegrationTestSuite) TestQueryNodeInfo() { + val := s.network.Validators[0] res, err := s.queryClient.GetNodeInfo(context.Background(), &cmtservice.GetNodeInfoRequest{}) s.Require().NoError(err) @@ -69,8 +71,8 @@ func (s *E2ETestSuite) TestQueryNodeInfo() { s.Require().Equal(getInfoRes.ApplicationVersion.AppName, version.NewInfo().AppName) } -func (s *E2ETestSuite) TestQuerySyncing() { - val := s.network.GetValidators()[0] +func (s *IntegrationTestSuite) TestQuerySyncing() { + val := s.network.Validators[0] _, err := s.queryClient.GetSyncing(context.Background(), &cmtservice.GetSyncingRequest{}) s.Require().NoError(err) @@ -81,33 +83,34 @@ func (s *E2ETestSuite) TestQuerySyncing() { s.Require().NoError(val.GetClientCtx().Codec.UnmarshalJSON(restRes, &syncingRes)) } -func (s *E2ETestSuite) TestQueryLatestBlock() { - val := s.network.GetValidators()[0] +func (s *IntegrationTestSuite) TestQueryLatestBlock() { + val := s.network.Validators[0] _, err := s.queryClient.GetLatestBlock(context.Background(), &cmtservice.GetLatestBlockRequest{}) s.Require().NoError(err) restRes, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/blocks/latest", val.GetAPIAddress())) s.Require().NoError(err) - var blockInfoRes cmtservice.GetLatestBlockResponse - s.Require().NoError(val.GetClientCtx().Codec.UnmarshalJSON(restRes, &blockInfoRes)) - s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvalcons") + var blockInfoRes tmservice.GetLatestBlockResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) + s.Require().Equal(types.ValAddress(blockInfoRes.Block.Header.ProposerAddress).String(), blockInfoRes.SdkBlock.Header.ProposerAddress) + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") } -func (s *E2ETestSuite) TestQueryBlockByHeight() { - val := s.network.GetValidators()[0] - _, err := s.queryClient.GetBlockByHeight(context.Background(), &cmtservice.GetBlockByHeightRequest{Height: 1}) +func (s *IntegrationTestSuite) TestQueryBlockByHeight() { + val := s.network.Validators[0] + _, err := s.queryClient.GetBlockByHeight(context.Background(), &tmservice.GetBlockByHeightRequest{Height: 1}) s.Require().NoError(err) restRes, err := testutil.GetRequest(fmt.Sprintf("%s/cosmos/base/tendermint/v1beta1/blocks/%d", val.GetAPIAddress(), 1)) s.Require().NoError(err) - var blockInfoRes cmtservice.GetBlockByHeightResponse - s.Require().NoError(val.GetClientCtx().Codec.UnmarshalJSON(restRes, &blockInfoRes)) - s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvalcons") + var blockInfoRes tmservice.GetBlockByHeightResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") } -func (s *E2ETestSuite) TestQueryLatestValidatorSet() { - val := s.network.GetValidators()[0] +func (s *IntegrationTestSuite) TestQueryLatestValidatorSet() { + val := s.network.Validators[0] // nil pagination res, err := s.queryClient.GetLatestValidatorSet(context.Background(), &cmtservice.GetLatestValidatorSetRequest{ @@ -141,8 +144,8 @@ func (s *E2ETestSuite) TestQueryLatestValidatorSet() { s.Require().Equal(validatorSetRes.Validators[0].PubKey, anyPub) } -func (s *E2ETestSuite) TestLatestValidatorSet_GRPC() { - vals := s.network.GetValidators() +func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPC() { + vals := s.network.Validators testCases := []struct { name string req *cmtservice.GetLatestValidatorSetRequest @@ -171,8 +174,8 @@ func (s *E2ETestSuite) TestLatestValidatorSet_GRPC() { } } -func (s *E2ETestSuite) TestLatestValidatorSet_GRPCGateway() { - vals := s.network.GetValidators() +func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { + vals := s.network.Validators testCases := []struct { name string url string @@ -202,8 +205,8 @@ func (s *E2ETestSuite) TestLatestValidatorSet_GRPCGateway() { } } -func (s *E2ETestSuite) TestValidatorSetByHeight_GRPC() { - vals := s.network.GetValidators() +func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { + vals := s.network.Validators testCases := []struct { name string req *cmtservice.GetValidatorSetByHeightRequest @@ -230,8 +233,8 @@ func (s *E2ETestSuite) TestValidatorSetByHeight_GRPC() { } } -func (s *E2ETestSuite) TestValidatorSetByHeight_GRPCGateway() { - vals := s.network.GetValidators() +func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { + vals := s.network.Validators testCases := []struct { name string url string @@ -259,7 +262,7 @@ func (s *E2ETestSuite) TestValidatorSetByHeight_GRPCGateway() { } } -func (s *E2ETestSuite) TestABCIQuery() { +func (s *IntegrationTestSuite) TestABCIQuery() { testCases := []struct { name string req *cmtservice.ABCIQueryRequest