diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go index d2773d136383..7628ae8226c2 100644 --- a/api/cosmos/authz/v1beta1/tx.pulsar.go +++ b/api/cosmos/authz/v1beta1/tx.pulsar.go @@ -2878,6 +2878,1030 @@ func (x *fastReflection_MsgRevokeResponse) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_MsgExecCompatResponse_1_list)(nil) + +type _MsgExecCompatResponse_1_list struct { + list *[][]byte +} + +func (x *_MsgExecCompatResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecCompatResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgExecCompatResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecCompatResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecCompatResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgExecCompatResponse at list field Results as it is not of Message kind")) +} + +func (x *_MsgExecCompatResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecCompatResponse_1_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgExecCompatResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgExecCompatResponse protoreflect.MessageDescriptor + fd_MsgExecCompatResponse_results protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_authz_v1beta1_tx_proto_init() + md_MsgExecCompatResponse = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgExecCompatResponse") + fd_MsgExecCompatResponse_results = md_MsgExecCompatResponse.Fields().ByName("results") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecCompatResponse)(nil) + +type fastReflection_MsgExecCompatResponse MsgExecCompatResponse + +func (x *MsgExecCompatResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecCompatResponse)(x) +} + +func (x *MsgExecCompatResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgExecCompatResponse_messageType fastReflection_MsgExecCompatResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecCompatResponse_messageType{} + +type fastReflection_MsgExecCompatResponse_messageType struct{} + +func (x fastReflection_MsgExecCompatResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecCompatResponse)(nil) +} +func (x fastReflection_MsgExecCompatResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecCompatResponse) +} +func (x fastReflection_MsgExecCompatResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecCompatResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecCompatResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecCompatResponse +} + +// 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_MsgExecCompatResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgExecCompatResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecCompatResponse) New() protoreflect.Message { + return new(fastReflection_MsgExecCompatResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecCompatResponse) Interface() protoreflect.ProtoMessage { + return (*MsgExecCompatResponse)(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_MsgExecCompatResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Results) != 0 { + value := protoreflect.ValueOfList(&_MsgExecCompatResponse_1_list{list: &x.Results}) + if !f(fd_MsgExecCompatResponse_results, 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_MsgExecCompatResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompatResponse.results": + return len(x.Results) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompatResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompatResponse 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_MsgExecCompatResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompatResponse.results": + x.Results = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompatResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompatResponse 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_MsgExecCompatResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompatResponse.results": + if len(x.Results) == 0 { + return protoreflect.ValueOfList(&_MsgExecCompatResponse_1_list{}) + } + listValue := &_MsgExecCompatResponse_1_list{list: &x.Results} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompatResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompatResponse 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_MsgExecCompatResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompatResponse.results": + lv := value.List() + clv := lv.(*_MsgExecCompatResponse_1_list) + x.Results = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompatResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompatResponse 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_MsgExecCompatResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompatResponse.results": + if x.Results == nil { + x.Results = [][]byte{} + } + value := &_MsgExecCompatResponse_1_list{list: &x.Results} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompatResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompatResponse 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_MsgExecCompatResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompatResponse.results": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgExecCompatResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompatResponse")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompatResponse 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_MsgExecCompatResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgExecCompatResponse", 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_MsgExecCompatResponse) 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_MsgExecCompatResponse) 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_MsgExecCompatResponse) 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_MsgExecCompatResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecCompatResponse) + 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.Results) > 0 { + for _, b := range x.Results { + l = len(b) + 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().(*MsgExecCompatResponse) + 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.Results) > 0 { + for iNdEx := len(x.Results) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Results[iNdEx]) + copy(dAtA[i:], x.Results[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Results[iNdEx]))) + 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().(*MsgExecCompatResponse) + 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: MsgExecCompatResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecCompatResponse: 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 Results", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Results = append(x.Results, make([]byte, postIndex-iNdEx)) + copy(x.Results[len(x.Results)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgExecCompat_2_list)(nil) + +type _MsgExecCompat_2_list struct { + list *[]string +} + +func (x *_MsgExecCompat_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgExecCompat_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgExecCompat_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgExecCompat_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgExecCompat_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgExecCompat at list field Msgs as it is not of Message kind")) +} + +func (x *_MsgExecCompat_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgExecCompat_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgExecCompat_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgExecCompat protoreflect.MessageDescriptor + fd_MsgExecCompat_grantee protoreflect.FieldDescriptor + fd_MsgExecCompat_msgs protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_authz_v1beta1_tx_proto_init() + md_MsgExecCompat = File_cosmos_authz_v1beta1_tx_proto.Messages().ByName("MsgExecCompat") + fd_MsgExecCompat_grantee = md_MsgExecCompat.Fields().ByName("grantee") + fd_MsgExecCompat_msgs = md_MsgExecCompat.Fields().ByName("msgs") +} + +var _ protoreflect.Message = (*fastReflection_MsgExecCompat)(nil) + +type fastReflection_MsgExecCompat MsgExecCompat + +func (x *MsgExecCompat) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgExecCompat)(x) +} + +func (x *MsgExecCompat) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[7] + 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_MsgExecCompat_messageType fastReflection_MsgExecCompat_messageType +var _ protoreflect.MessageType = fastReflection_MsgExecCompat_messageType{} + +type fastReflection_MsgExecCompat_messageType struct{} + +func (x fastReflection_MsgExecCompat_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgExecCompat)(nil) +} +func (x fastReflection_MsgExecCompat_messageType) New() protoreflect.Message { + return new(fastReflection_MsgExecCompat) +} +func (x fastReflection_MsgExecCompat_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecCompat +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgExecCompat) Descriptor() protoreflect.MessageDescriptor { + return md_MsgExecCompat +} + +// 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_MsgExecCompat) Type() protoreflect.MessageType { + return _fastReflection_MsgExecCompat_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgExecCompat) New() protoreflect.Message { + return new(fastReflection_MsgExecCompat) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgExecCompat) Interface() protoreflect.ProtoMessage { + return (*MsgExecCompat)(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_MsgExecCompat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Grantee != "" { + value := protoreflect.ValueOfString(x.Grantee) + if !f(fd_MsgExecCompat_grantee, value) { + return + } + } + if len(x.Msgs) != 0 { + value := protoreflect.ValueOfList(&_MsgExecCompat_2_list{list: &x.Msgs}) + if !f(fd_MsgExecCompat_msgs, 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_MsgExecCompat) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompat.grantee": + return x.Grantee != "" + case "cosmos.authz.v1beta1.MsgExecCompat.msgs": + return len(x.Msgs) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompat")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompat 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_MsgExecCompat) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompat.grantee": + x.Grantee = "" + case "cosmos.authz.v1beta1.MsgExecCompat.msgs": + x.Msgs = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompat")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompat 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_MsgExecCompat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompat.grantee": + value := x.Grantee + return protoreflect.ValueOfString(value) + case "cosmos.authz.v1beta1.MsgExecCompat.msgs": + if len(x.Msgs) == 0 { + return protoreflect.ValueOfList(&_MsgExecCompat_2_list{}) + } + listValue := &_MsgExecCompat_2_list{list: &x.Msgs} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompat")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompat 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_MsgExecCompat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompat.grantee": + x.Grantee = value.Interface().(string) + case "cosmos.authz.v1beta1.MsgExecCompat.msgs": + lv := value.List() + clv := lv.(*_MsgExecCompat_2_list) + x.Msgs = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompat")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompat 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_MsgExecCompat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompat.msgs": + if x.Msgs == nil { + x.Msgs = []string{} + } + value := &_MsgExecCompat_2_list{list: &x.Msgs} + return protoreflect.ValueOfList(value) + case "cosmos.authz.v1beta1.MsgExecCompat.grantee": + panic(fmt.Errorf("field grantee of message cosmos.authz.v1beta1.MsgExecCompat is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompat")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompat 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_MsgExecCompat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.authz.v1beta1.MsgExecCompat.grantee": + return protoreflect.ValueOfString("") + case "cosmos.authz.v1beta1.MsgExecCompat.msgs": + list := []string{} + return protoreflect.ValueOfList(&_MsgExecCompat_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.authz.v1beta1.MsgExecCompat")) + } + panic(fmt.Errorf("message cosmos.authz.v1beta1.MsgExecCompat 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_MsgExecCompat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.authz.v1beta1.MsgExecCompat", 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_MsgExecCompat) 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_MsgExecCompat) 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_MsgExecCompat) 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_MsgExecCompat) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgExecCompat) + 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.Grantee) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Msgs) > 0 { + for _, s := range x.Msgs { + 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().(*MsgExecCompat) + 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.Msgs) > 0 { + for iNdEx := len(x.Msgs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Msgs[iNdEx]) + copy(dAtA[i:], x.Msgs[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Msgs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + 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] = 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().(*MsgExecCompat) + 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: MsgExecCompat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecCompat: 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 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 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Msgs", 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.Msgs = append(x.Msgs, 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, + } +} + // Since: cosmos-sdk 0.43 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -3138,6 +4162,87 @@ func (*MsgRevokeResponse) Descriptor() ([]byte, []int) { return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{5} } +// MsgExecCompatResponse defines the Msg/MsgExecCompatResponse response type. +type MsgExecCompatResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (x *MsgExecCompatResponse) Reset() { + *x = MsgExecCompatResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecCompatResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecCompatResponse) ProtoMessage() {} + +// Deprecated: Use MsgExecCompatResponse.ProtoReflect.Descriptor instead. +func (*MsgExecCompatResponse) Descriptor() ([]byte, []int) { + return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgExecCompatResponse) GetResults() [][]byte { + if x != nil { + return x.Results + } + return nil +} + +// MsgExecCompat supports legacy amino codec for frontend metamask signing +// Functions are same as MsgExec, but input for msgs is array of strings +type MsgExecCompat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + Msgs []string `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty"` +} + +func (x *MsgExecCompat) Reset() { + *x = MsgExecCompat{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_authz_v1beta1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgExecCompat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgExecCompat) ProtoMessage() {} + +// Deprecated: Use MsgExecCompat.ProtoReflect.Descriptor instead. +func (*MsgExecCompat) Descriptor() ([]byte, []int) { + return file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgExecCompat) GetGrantee() string { + if x != nil { + return x.Grantee + } + return "" +} + +func (x *MsgExecCompat) GetMsgs() []string { + if x != nil { + return x.Msgs + } + return nil +} + var File_cosmos_authz_v1beta1_tx_proto protoreflect.FileDescriptor var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ @@ -3195,37 +4300,54 @@ var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{ 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xff, 0x01, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x15, 0x4d, 0x73, 0x67, + 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x7c, 0x0a, 0x0d, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x12, 0x32, 0x0a, + 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 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, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x04, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x65, 0x65, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x32, 0xdf, 0x02, 0x0a, 0x03, 0x4d, + 0x73, 0x67, 0x12, 0x4f, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x1d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x63, 0x6f, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x52, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, 0x18, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x7a, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x14, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, - 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x74, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcd, 0x01, 0x0a, + 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, + 0x7a, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, + 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, + 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3240,28 +4362,32 @@ func file_cosmos_authz_v1beta1_tx_proto_rawDescGZIP() []byte { return file_cosmos_authz_v1beta1_tx_proto_rawDescData } -var file_cosmos_authz_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cosmos_authz_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_cosmos_authz_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgGrant)(nil), // 0: cosmos.authz.v1beta1.MsgGrant - (*MsgExecResponse)(nil), // 1: cosmos.authz.v1beta1.MsgExecResponse - (*MsgExec)(nil), // 2: cosmos.authz.v1beta1.MsgExec - (*MsgGrantResponse)(nil), // 3: cosmos.authz.v1beta1.MsgGrantResponse - (*MsgRevoke)(nil), // 4: cosmos.authz.v1beta1.MsgRevoke - (*MsgRevokeResponse)(nil), // 5: cosmos.authz.v1beta1.MsgRevokeResponse - (*Grant)(nil), // 6: cosmos.authz.v1beta1.Grant - (*anypb.Any)(nil), // 7: google.protobuf.Any + (*MsgGrant)(nil), // 0: cosmos.authz.v1beta1.MsgGrant + (*MsgExecResponse)(nil), // 1: cosmos.authz.v1beta1.MsgExecResponse + (*MsgExec)(nil), // 2: cosmos.authz.v1beta1.MsgExec + (*MsgGrantResponse)(nil), // 3: cosmos.authz.v1beta1.MsgGrantResponse + (*MsgRevoke)(nil), // 4: cosmos.authz.v1beta1.MsgRevoke + (*MsgRevokeResponse)(nil), // 5: cosmos.authz.v1beta1.MsgRevokeResponse + (*MsgExecCompatResponse)(nil), // 6: cosmos.authz.v1beta1.MsgExecCompatResponse + (*MsgExecCompat)(nil), // 7: cosmos.authz.v1beta1.MsgExecCompat + (*Grant)(nil), // 8: cosmos.authz.v1beta1.Grant + (*anypb.Any)(nil), // 9: google.protobuf.Any } var file_cosmos_authz_v1beta1_tx_proto_depIdxs = []int32{ - 6, // 0: cosmos.authz.v1beta1.MsgGrant.grant:type_name -> cosmos.authz.v1beta1.Grant - 7, // 1: cosmos.authz.v1beta1.MsgExec.msgs:type_name -> google.protobuf.Any + 8, // 0: cosmos.authz.v1beta1.MsgGrant.grant:type_name -> cosmos.authz.v1beta1.Grant + 9, // 1: cosmos.authz.v1beta1.MsgExec.msgs:type_name -> google.protobuf.Any 0, // 2: cosmos.authz.v1beta1.Msg.Grant:input_type -> cosmos.authz.v1beta1.MsgGrant 2, // 3: cosmos.authz.v1beta1.Msg.Exec:input_type -> cosmos.authz.v1beta1.MsgExec 4, // 4: cosmos.authz.v1beta1.Msg.Revoke:input_type -> cosmos.authz.v1beta1.MsgRevoke - 3, // 5: cosmos.authz.v1beta1.Msg.Grant:output_type -> cosmos.authz.v1beta1.MsgGrantResponse - 1, // 6: cosmos.authz.v1beta1.Msg.Exec:output_type -> cosmos.authz.v1beta1.MsgExecResponse - 5, // 7: cosmos.authz.v1beta1.Msg.Revoke:output_type -> cosmos.authz.v1beta1.MsgRevokeResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type + 7, // 5: cosmos.authz.v1beta1.Msg.ExecCompat:input_type -> cosmos.authz.v1beta1.MsgExecCompat + 3, // 6: cosmos.authz.v1beta1.Msg.Grant:output_type -> cosmos.authz.v1beta1.MsgGrantResponse + 1, // 7: cosmos.authz.v1beta1.Msg.Exec:output_type -> cosmos.authz.v1beta1.MsgExecResponse + 5, // 8: cosmos.authz.v1beta1.Msg.Revoke:output_type -> cosmos.authz.v1beta1.MsgRevokeResponse + 6, // 9: cosmos.authz.v1beta1.Msg.ExecCompat:output_type -> cosmos.authz.v1beta1.MsgExecCompatResponse + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -3346,6 +4472,30 @@ func file_cosmos_authz_v1beta1_tx_proto_init() { return nil } } + file_cosmos_authz_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecCompatResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_authz_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecCompat); 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{ @@ -3353,7 +4503,7 @@ func file_cosmos_authz_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_authz_v1beta1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/authz/v1beta1/tx_grpc.pb.go b/api/cosmos/authz/v1beta1/tx_grpc.pb.go index 2dcbc3ed90f6..c69062dcfd92 100644 --- a/api/cosmos/authz/v1beta1/tx_grpc.pb.go +++ b/api/cosmos/authz/v1beta1/tx_grpc.pb.go @@ -21,9 +21,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_Grant_FullMethodName = "/cosmos.authz.v1beta1.Msg/Grant" - Msg_Exec_FullMethodName = "/cosmos.authz.v1beta1.Msg/Exec" - Msg_Revoke_FullMethodName = "/cosmos.authz.v1beta1.Msg/Revoke" + Msg_Grant_FullMethodName = "/cosmos.authz.v1beta1.Msg/Grant" + Msg_Exec_FullMethodName = "/cosmos.authz.v1beta1.Msg/Exec" + Msg_Revoke_FullMethodName = "/cosmos.authz.v1beta1.Msg/Revoke" + Msg_ExecCompat_FullMethodName = "/cosmos.authz.v1beta1.Msg/ExecCompat" ) // MsgClient is the client API for Msg service. @@ -42,6 +43,7 @@ type MsgClient interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) + ExecCompat(ctx context.Context, in *MsgExecCompat, opts ...grpc.CallOption) (*MsgExecCompatResponse, error) } type msgClient struct { @@ -79,6 +81,15 @@ func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.Call return out, nil } +func (c *msgClient) ExecCompat(ctx context.Context, in *MsgExecCompat, opts ...grpc.CallOption) (*MsgExecCompatResponse, error) { + out := new(MsgExecCompatResponse) + err := c.cc.Invoke(ctx, Msg_ExecCompat_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -95,6 +106,7 @@ type MsgServer interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) + ExecCompat(context.Context, *MsgExecCompat) (*MsgExecCompatResponse, error) mustEmbedUnimplementedMsgServer() } @@ -111,6 +123,9 @@ func (UnimplementedMsgServer) Exec(context.Context, *MsgExec) (*MsgExecResponse, func (UnimplementedMsgServer) Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } +func (UnimplementedMsgServer) ExecCompat(context.Context, *MsgExecCompat) (*MsgExecCompatResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecCompat not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -178,6 +193,24 @@ func _Msg_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interfac return interceptor(ctx, in, info, handler) } +func _Msg_ExecCompat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExecCompat) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExecCompat(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_ExecCompat_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExecCompat(ctx, req.(*MsgExecCompat)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -197,6 +230,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Revoke", Handler: _Msg_Revoke_Handler, }, + { + MethodName: "ExecCompat", + Handler: _Msg_ExecCompat_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/authz/v1beta1/tx.proto", diff --git a/api/cosmos/bank/v1beta1/events.pulsar.go b/api/cosmos/bank/v1beta1/events.pulsar.go new file mode 100644 index 000000000000..3a979c717249 --- /dev/null +++ b/api/cosmos/bank/v1beta1/events.pulsar.go @@ -0,0 +1,1282 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package bankv1beta1 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_EventSetBalances_1_list)(nil) + +type _EventSetBalances_1_list struct { + list *[]*BalanceUpdate +} + +func (x *_EventSetBalances_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EventSetBalances_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_EventSetBalances_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*BalanceUpdate) + (*x.list)[i] = concreteValue +} + +func (x *_EventSetBalances_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*BalanceUpdate) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EventSetBalances_1_list) AppendMutable() protoreflect.Value { + v := new(BalanceUpdate) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EventSetBalances_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_EventSetBalances_1_list) NewElement() protoreflect.Value { + v := new(BalanceUpdate) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EventSetBalances_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_EventSetBalances protoreflect.MessageDescriptor + fd_EventSetBalances_balance_updates protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_bank_v1beta1_events_proto_init() + md_EventSetBalances = File_cosmos_bank_v1beta1_events_proto.Messages().ByName("EventSetBalances") + fd_EventSetBalances_balance_updates = md_EventSetBalances.Fields().ByName("balance_updates") +} + +var _ protoreflect.Message = (*fastReflection_EventSetBalances)(nil) + +type fastReflection_EventSetBalances EventSetBalances + +func (x *EventSetBalances) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventSetBalances)(x) +} + +func (x *EventSetBalances) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_events_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_EventSetBalances_messageType fastReflection_EventSetBalances_messageType +var _ protoreflect.MessageType = fastReflection_EventSetBalances_messageType{} + +type fastReflection_EventSetBalances_messageType struct{} + +func (x fastReflection_EventSetBalances_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventSetBalances)(nil) +} +func (x fastReflection_EventSetBalances_messageType) New() protoreflect.Message { + return new(fastReflection_EventSetBalances) +} +func (x fastReflection_EventSetBalances_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventSetBalances +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventSetBalances) Descriptor() protoreflect.MessageDescriptor { + return md_EventSetBalances +} + +// 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_EventSetBalances) Type() protoreflect.MessageType { + return _fastReflection_EventSetBalances_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventSetBalances) New() protoreflect.Message { + return new(fastReflection_EventSetBalances) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventSetBalances) Interface() protoreflect.ProtoMessage { + return (*EventSetBalances)(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_EventSetBalances) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.BalanceUpdates) != 0 { + value := protoreflect.ValueOfList(&_EventSetBalances_1_list{list: &x.BalanceUpdates}) + if !f(fd_EventSetBalances_balance_updates, 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_EventSetBalances) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.bank.v1beta1.EventSetBalances.balance_updates": + return len(x.BalanceUpdates) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.EventSetBalances")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.EventSetBalances 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_EventSetBalances) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.EventSetBalances.balance_updates": + x.BalanceUpdates = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.EventSetBalances")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.EventSetBalances 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_EventSetBalances) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.bank.v1beta1.EventSetBalances.balance_updates": + if len(x.BalanceUpdates) == 0 { + return protoreflect.ValueOfList(&_EventSetBalances_1_list{}) + } + listValue := &_EventSetBalances_1_list{list: &x.BalanceUpdates} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.EventSetBalances")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.EventSetBalances 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_EventSetBalances) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.EventSetBalances.balance_updates": + lv := value.List() + clv := lv.(*_EventSetBalances_1_list) + x.BalanceUpdates = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.EventSetBalances")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.EventSetBalances 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_EventSetBalances) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.EventSetBalances.balance_updates": + if x.BalanceUpdates == nil { + x.BalanceUpdates = []*BalanceUpdate{} + } + value := &_EventSetBalances_1_list{list: &x.BalanceUpdates} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.EventSetBalances")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.EventSetBalances 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_EventSetBalances) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.EventSetBalances.balance_updates": + list := []*BalanceUpdate{} + return protoreflect.ValueOfList(&_EventSetBalances_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.EventSetBalances")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.EventSetBalances 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_EventSetBalances) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.EventSetBalances", 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_EventSetBalances) 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_EventSetBalances) 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_EventSetBalances) 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_EventSetBalances) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventSetBalances) + 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.BalanceUpdates) > 0 { + for _, e := range x.BalanceUpdates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventSetBalances) + 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.BalanceUpdates) > 0 { + for iNdEx := len(x.BalanceUpdates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.BalanceUpdates[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().(*EventSetBalances) + 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: EventSetBalances: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventSetBalances: 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 BalanceUpdates", 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.BalanceUpdates = append(x.BalanceUpdates, &BalanceUpdate{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BalanceUpdates[len(x.BalanceUpdates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_BalanceUpdate protoreflect.MessageDescriptor + fd_BalanceUpdate_addr protoreflect.FieldDescriptor + fd_BalanceUpdate_denom protoreflect.FieldDescriptor + fd_BalanceUpdate_amt protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_bank_v1beta1_events_proto_init() + md_BalanceUpdate = File_cosmos_bank_v1beta1_events_proto.Messages().ByName("BalanceUpdate") + fd_BalanceUpdate_addr = md_BalanceUpdate.Fields().ByName("addr") + fd_BalanceUpdate_denom = md_BalanceUpdate.Fields().ByName("denom") + fd_BalanceUpdate_amt = md_BalanceUpdate.Fields().ByName("amt") +} + +var _ protoreflect.Message = (*fastReflection_BalanceUpdate)(nil) + +type fastReflection_BalanceUpdate BalanceUpdate + +func (x *BalanceUpdate) ProtoReflect() protoreflect.Message { + return (*fastReflection_BalanceUpdate)(x) +} + +func (x *BalanceUpdate) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_bank_v1beta1_events_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_BalanceUpdate_messageType fastReflection_BalanceUpdate_messageType +var _ protoreflect.MessageType = fastReflection_BalanceUpdate_messageType{} + +type fastReflection_BalanceUpdate_messageType struct{} + +func (x fastReflection_BalanceUpdate_messageType) Zero() protoreflect.Message { + return (*fastReflection_BalanceUpdate)(nil) +} +func (x fastReflection_BalanceUpdate_messageType) New() protoreflect.Message { + return new(fastReflection_BalanceUpdate) +} +func (x fastReflection_BalanceUpdate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BalanceUpdate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BalanceUpdate) Descriptor() protoreflect.MessageDescriptor { + return md_BalanceUpdate +} + +// 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_BalanceUpdate) Type() protoreflect.MessageType { + return _fastReflection_BalanceUpdate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BalanceUpdate) New() protoreflect.Message { + return new(fastReflection_BalanceUpdate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BalanceUpdate) Interface() protoreflect.ProtoMessage { + return (*BalanceUpdate)(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_BalanceUpdate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Addr) != 0 { + value := protoreflect.ValueOfBytes(x.Addr) + if !f(fd_BalanceUpdate_addr, value) { + return + } + } + if len(x.Denom) != 0 { + value := protoreflect.ValueOfBytes(x.Denom) + if !f(fd_BalanceUpdate_denom, value) { + return + } + } + if x.Amt != "" { + value := protoreflect.ValueOfString(x.Amt) + if !f(fd_BalanceUpdate_amt, 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_BalanceUpdate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.bank.v1beta1.BalanceUpdate.addr": + return len(x.Addr) != 0 + case "cosmos.bank.v1beta1.BalanceUpdate.denom": + return len(x.Denom) != 0 + case "cosmos.bank.v1beta1.BalanceUpdate.amt": + return x.Amt != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.BalanceUpdate")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.BalanceUpdate 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_BalanceUpdate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.BalanceUpdate.addr": + x.Addr = nil + case "cosmos.bank.v1beta1.BalanceUpdate.denom": + x.Denom = nil + case "cosmos.bank.v1beta1.BalanceUpdate.amt": + x.Amt = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.BalanceUpdate")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.BalanceUpdate 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_BalanceUpdate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.bank.v1beta1.BalanceUpdate.addr": + value := x.Addr + return protoreflect.ValueOfBytes(value) + case "cosmos.bank.v1beta1.BalanceUpdate.denom": + value := x.Denom + return protoreflect.ValueOfBytes(value) + case "cosmos.bank.v1beta1.BalanceUpdate.amt": + value := x.Amt + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.BalanceUpdate")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.BalanceUpdate 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_BalanceUpdate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.bank.v1beta1.BalanceUpdate.addr": + x.Addr = value.Bytes() + case "cosmos.bank.v1beta1.BalanceUpdate.denom": + x.Denom = value.Bytes() + case "cosmos.bank.v1beta1.BalanceUpdate.amt": + x.Amt = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.BalanceUpdate")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.BalanceUpdate 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_BalanceUpdate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.BalanceUpdate.addr": + panic(fmt.Errorf("field addr of message cosmos.bank.v1beta1.BalanceUpdate is not mutable")) + case "cosmos.bank.v1beta1.BalanceUpdate.denom": + panic(fmt.Errorf("field denom of message cosmos.bank.v1beta1.BalanceUpdate is not mutable")) + case "cosmos.bank.v1beta1.BalanceUpdate.amt": + panic(fmt.Errorf("field amt of message cosmos.bank.v1beta1.BalanceUpdate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.BalanceUpdate")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.BalanceUpdate 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_BalanceUpdate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.bank.v1beta1.BalanceUpdate.addr": + return protoreflect.ValueOfBytes(nil) + case "cosmos.bank.v1beta1.BalanceUpdate.denom": + return protoreflect.ValueOfBytes(nil) + case "cosmos.bank.v1beta1.BalanceUpdate.amt": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.bank.v1beta1.BalanceUpdate")) + } + panic(fmt.Errorf("message cosmos.bank.v1beta1.BalanceUpdate 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_BalanceUpdate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.bank.v1beta1.BalanceUpdate", 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_BalanceUpdate) 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_BalanceUpdate) 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_BalanceUpdate) 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_BalanceUpdate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BalanceUpdate) + 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.Addr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Amt) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*BalanceUpdate) + 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.Amt) > 0 { + i -= len(x.Amt) + copy(dAtA[i:], x.Amt) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amt))) + i-- + dAtA[i] = 0x1a + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(x.Addr) > 0 { + i -= len(x.Addr) + copy(dAtA[i:], x.Addr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Addr))) + 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().(*BalanceUpdate) + 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: BalanceUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BalanceUpdate: 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 Addr", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Addr = append(x.Addr[:0], dAtA[iNdEx:postIndex]...) + if x.Addr == nil { + x.Addr = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = append(x.Denom[:0], dAtA[iNdEx:postIndex]...) + if x.Denom == nil { + x.Denom = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amt", 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.Amt = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/bank/v1beta1/events.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) +) + +// EventSetBalance is an event that tracks the latest bank balance. +type EventSetBalances struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BalanceUpdates []*BalanceUpdate `protobuf:"bytes,1,rep,name=balance_updates,json=balanceUpdates,proto3" json:"balance_updates,omitempty"` +} + +func (x *EventSetBalances) Reset() { + *x = EventSetBalances{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_bank_v1beta1_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventSetBalances) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventSetBalances) ProtoMessage() {} + +// Deprecated: Use EventSetBalances.ProtoReflect.Descriptor instead. +func (*EventSetBalances) Descriptor() ([]byte, []int) { + return file_cosmos_bank_v1beta1_events_proto_rawDescGZIP(), []int{0} +} + +func (x *EventSetBalances) GetBalanceUpdates() []*BalanceUpdate { + if x != nil { + return x.BalanceUpdates + } + return nil +} + +// BalanceUpdate contains a given address's latest balance +type BalanceUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Addr []byte `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` + Denom []byte `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + // the latest amount + Amt string `protobuf:"bytes,3,opt,name=amt,proto3" json:"amt,omitempty"` +} + +func (x *BalanceUpdate) Reset() { + *x = BalanceUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_bank_v1beta1_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BalanceUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BalanceUpdate) ProtoMessage() {} + +// Deprecated: Use BalanceUpdate.ProtoReflect.Descriptor instead. +func (*BalanceUpdate) Descriptor() ([]byte, []int) { + return file_cosmos_bank_v1beta1_events_proto_rawDescGZIP(), []int{1} +} + +func (x *BalanceUpdate) GetAddr() []byte { + if x != nil { + return x.Addr + } + return nil +} + +func (x *BalanceUpdate) GetDenom() []byte { + if x != nil { + return x.Denom + } + return nil +} + +func (x *BalanceUpdate) GetAmt() string { + if x != nil { + return x.Amt + } + return "" +} + +var File_cosmos_bank_v1beta1_events_proto protoreflect.FileDescriptor + +var file_cosmos_bank_v1beta1_events_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x10, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x4b, 0x0a, 0x0f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x8e, 0x01, 0x0a, + 0x0d, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x64, + 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x53, 0x0a, 0x03, 0x61, 0x6d, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x26, 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, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x42, 0xc6, 0x01, + 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x6e, + 0x6b, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x62, 0x61, 0x6e, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, + 0x61, 0x6e, 0x6b, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, + 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x6e, 0x6b, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x6e, 0x6b, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x6b, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_bank_v1beta1_events_proto_rawDescOnce sync.Once + file_cosmos_bank_v1beta1_events_proto_rawDescData = file_cosmos_bank_v1beta1_events_proto_rawDesc +) + +func file_cosmos_bank_v1beta1_events_proto_rawDescGZIP() []byte { + file_cosmos_bank_v1beta1_events_proto_rawDescOnce.Do(func() { + file_cosmos_bank_v1beta1_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_bank_v1beta1_events_proto_rawDescData) + }) + return file_cosmos_bank_v1beta1_events_proto_rawDescData +} + +var file_cosmos_bank_v1beta1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_bank_v1beta1_events_proto_goTypes = []interface{}{ + (*EventSetBalances)(nil), // 0: cosmos.bank.v1beta1.EventSetBalances + (*BalanceUpdate)(nil), // 1: cosmos.bank.v1beta1.BalanceUpdate +} +var file_cosmos_bank_v1beta1_events_proto_depIdxs = []int32{ + 1, // 0: cosmos.bank.v1beta1.EventSetBalances.balance_updates:type_name -> cosmos.bank.v1beta1.BalanceUpdate + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_cosmos_bank_v1beta1_events_proto_init() } +func file_cosmos_bank_v1beta1_events_proto_init() { + if File_cosmos_bank_v1beta1_events_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_bank_v1beta1_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventSetBalances); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_bank_v1beta1_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BalanceUpdate); 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_bank_v1beta1_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_bank_v1beta1_events_proto_goTypes, + DependencyIndexes: file_cosmos_bank_v1beta1_events_proto_depIdxs, + MessageInfos: file_cosmos_bank_v1beta1_events_proto_msgTypes, + }.Build() + File_cosmos_bank_v1beta1_events_proto = out.File + file_cosmos_bank_v1beta1_events_proto_rawDesc = nil + file_cosmos_bank_v1beta1_events_proto_goTypes = nil + file_cosmos_bank_v1beta1_events_proto_depIdxs = nil +} diff --git a/baseapp/abci.go b/baseapp/abci.go index b703ab9b8748..07f4f9b7f6e0 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -194,6 +194,7 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg if app.beginBlocker != nil { res = app.beginBlocker(app.deliverState.ctx, req) + app.AddStreamEvents(req.Header.Height, res.Events, false) res.Events = sdk.MarkEventsToIndex(res.Events, app.indexEvents) } // set the signed validators for addition to context in deliverTx @@ -217,6 +218,7 @@ func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBloc if app.endBlocker != nil { res = app.endBlocker(app.deliverState.ctx, req) + app.AddStreamEvents(req.Height, res.Events, true) res.Events = sdk.MarkEventsToIndex(res.Events, app.indexEvents) } @@ -412,6 +414,8 @@ func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliv return sdkerrors.ResponseDeliverTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, sdk.MarkEventsToIndex(anteEvents, app.indexEvents), app.trace) } + app.AddStreamEvents(app.checkState.Context().BlockHeight(), result.Events, false) + return abci.ResponseDeliverTx{ GasWanted: int64(gInfo.GasWanted), // TODO: Should type accept unsigned ints? GasUsed: int64(gInfo.GasUsed), // TODO: Should type accept unsigned ints? diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 3a90eaf2b815..e370619a9e83 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -144,6 +144,9 @@ type BaseApp struct { //nolint: maligned abciListeners []ABCIListener chainID string + + // StreamEvents + StreamEvents chan StreamEvents } // NewBaseApp returns a reference to an initialized BaseApp. It accepts a @@ -164,6 +167,7 @@ func NewBaseApp( msgServiceRouter: NewMsgServiceRouter(), txDecoder: txDecoder, fauxMerkleMode: false, + StreamEvents: make(chan StreamEvents), } for _, option := range options { diff --git a/baseapp/chain_stream.go b/baseapp/chain_stream.go new file mode 100644 index 000000000000..968728b8506d --- /dev/null +++ b/baseapp/chain_stream.go @@ -0,0 +1,19 @@ +package baseapp + +import abci "github.com/cometbft/cometbft/abci/types" + +type StreamEvents struct { + Events []abci.Event + Height uint64 + Flush bool +} + +func (app *BaseApp) AddStreamEvents(height int64, events []abci.Event, flush bool) { + go func() { + app.StreamEvents <- StreamEvents{ + Events: events, + Height: uint64(height), + Flush: flush, + } + }() +} diff --git a/proto/cosmos/authz/v1beta1/tx.proto b/proto/cosmos/authz/v1beta1/tx.proto index 69277c95ee28..a734ec4fa6d9 100644 --- a/proto/cosmos/authz/v1beta1/tx.proto +++ b/proto/cosmos/authz/v1beta1/tx.proto @@ -30,6 +30,8 @@ service Msg { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); + + rpc ExecCompat(MsgExecCompat) returns (MsgExecCompatResponse); } // MsgGrant is a request type for Grant method. It declares authorization to the grantee @@ -79,3 +81,18 @@ message MsgRevoke { // MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. message MsgRevokeResponse {} + +// MsgExecCompatResponse defines the Msg/MsgExecCompatResponse response type. +message MsgExecCompatResponse { + repeated bytes results = 1; +} + +// MsgExecCompat supports legacy amino codec for frontend metamask signing +// Functions are same as MsgExec, but input for msgs is array of strings +message MsgExecCompat { + option (cosmos.msg.v1.signer) = "grantee"; + option (amino.name) = "cosmos-sdk/MsgExec"; + + string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated string msgs = 2; +} diff --git a/x/authz/codec.go b/x/authz/codec.go index c9a07702d951..4c27d1829358 100644 --- a/x/authz/codec.go +++ b/x/authz/codec.go @@ -17,6 +17,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgGrant{}, "cosmos-sdk/MsgGrant") legacy.RegisterAminoMsg(cdc, &MsgRevoke{}, "cosmos-sdk/MsgRevoke") legacy.RegisterAminoMsg(cdc, &MsgExec{}, "cosmos-sdk/MsgExec") + legacy.RegisterAminoMsg(cdc, &MsgExecCompat{}, "cosmos-sdk/MsgExecCompat") cdc.RegisterInterface((*Authorization)(nil), nil) cdc.RegisterConcrete(&GenericAuthorization{}, "cosmos-sdk/GenericAuthorization", nil) @@ -28,6 +29,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgGrant{}, &MsgRevoke{}, &MsgExec{}, + &MsgExecCompat{}, ) registry.RegisterInterface( diff --git a/x/authz/codec/cdc.go b/x/authz/codec/cdc.go index 520e435afd69..8c4c28fd9b94 100644 --- a/x/authz/codec/cdc.go +++ b/x/authz/codec/cdc.go @@ -2,6 +2,7 @@ package codec import ( "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -9,6 +10,7 @@ import ( var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewAminoCodec(Amino) + GlobalCdc = codec.NewProtoCodec(types.NewInterfaceRegistry()) ) func init() { diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 788b87418e23..211474bccb1c 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "encoding/base64" "fmt" "strconv" "time" @@ -101,7 +102,7 @@ func (k Keeper) DispatchActions(ctx sdk.Context, grantee sdk.AccAddress, msgs [] grant, found := k.getGrant(ctx, skey) if !found { - return nil, sdkerrors.Wrapf(authz.ErrNoAuthorizationFound, "failed to update grant with key %s", string(skey)) + return nil, sdkerrors.Wrapf(authz.ErrNoAuthorizationFound, "failed to update grant with key %s", base64.StdEncoding.EncodeToString(skey)) } if grant.Expiration != nil && grant.Expiration.Before(now) { diff --git a/x/authz/keeper/msg_server.go b/x/authz/keeper/msg_server.go index 358146124d8f..c4f7f6928bc8 100644 --- a/x/authz/keeper/msg_server.go +++ b/x/authz/keeper/msg_server.go @@ -2,10 +2,12 @@ package keeper import ( "context" + "fmt" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" + "github.com/cosmos/cosmos-sdk/x/authz/codec" ) var _ authz.MsgServer = Keeper{} @@ -88,3 +90,29 @@ func (k Keeper) Exec(goCtx context.Context, msg *authz.MsgExec) (*authz.MsgExecR return &authz.MsgExecResponse{Results: results}, nil } + +// Exec implements the MsgServer.ExecCompat method. +func (k Keeper) ExecCompat(goCtx context.Context, msg *authz.MsgExecCompat) (*authz.MsgExecCompatResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + grantee, err := sdk.AccAddressFromBech32(msg.Grantee) + if err != nil { + return nil, err + } + + subMsgs := make([]sdk.Msg, len(msg.Msgs)) + for idx, m := range msg.Msgs { + var iMsg sdk.Msg + err := codec.GlobalCdc.UnmarshalInterfaceJSON([]byte(m), &iMsg) + if err != nil { + return nil, err + } + subMsgs[idx] = iMsg + } + + results, err := k.DispatchActions(ctx, grantee, subMsgs) + if err != nil { + return nil, fmt.Errorf("dispatch err: %w", err) + } + + return &authz.MsgExecCompatResponse{Results: results}, nil +} diff --git a/x/authz/msgs.go b/x/authz/msgs.go index fd84b311d7e9..270c8166a815 100644 --- a/x/authz/msgs.go +++ b/x/authz/msgs.go @@ -1,6 +1,7 @@ package authz import ( + "fmt" "time" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" @@ -249,3 +250,50 @@ func (msg MsgExec) Route() string { func (msg MsgExec) GetSignBytes() []byte { return sdk.MustSortJSON(authzcodec.ModuleCdc.MustMarshalJSON(&msg)) } + +// GetSigners implements Msg +func (msg MsgExecCompat) GetSigners() []sdk.AccAddress { + grantee, _ := sdk.AccAddressFromBech32(msg.Grantee) + return []sdk.AccAddress{grantee} +} + +// ValidateBasic implements Msg +func (msg MsgExecCompat) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Grantee); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", err) + } + + if len(msg.Msgs) == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("messages cannot be empty") + } + + for idx, m := range msg.Msgs { + var iMsg sdk.Msg + err := authzcodec.GlobalCdc.UnmarshalInterfaceJSON([]byte(m), &iMsg) + if err != nil { + return fmt.Errorf("parse message at index %d error: %w", idx, err) + } + + err = iMsg.ValidateBasic() + if err != nil { + return fmt.Errorf("validate message at index %d error: %w", idx, err) + } + } + + return nil +} + +// Type implements the LegacyMsg.Type method. +func (msg MsgExecCompat) Type() string { + return sdk.MsgTypeURL(&msg) +} + +// Route implements the LegacyMsg.Route method. +func (msg MsgExecCompat) Route() string { + return sdk.MsgTypeURL(&msg) +} + +// GetSignBytes implements the LegacyMsg.GetSignBytes method. +func (msg MsgExecCompat) GetSignBytes() []byte { + return sdk.MustSortJSON(authzcodec.ModuleCdc.MustMarshalJSON(&msg)) +} diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go index 369d9283e46c..9c6694656ce9 100644 --- a/x/authz/tx.pb.go +++ b/x/authz/tx.pb.go @@ -270,6 +270,84 @@ func (m *MsgRevokeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRevokeResponse proto.InternalMessageInfo +// MsgExecCompatResponse defines the Msg/MsgExecCompatResponse response type. +type MsgExecCompatResponse struct { + Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (m *MsgExecCompatResponse) Reset() { *m = MsgExecCompatResponse{} } +func (m *MsgExecCompatResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecCompatResponse) ProtoMessage() {} +func (*MsgExecCompatResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3ceddab7d8589ad1, []int{6} +} +func (m *MsgExecCompatResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecCompatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecCompatResponse.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 *MsgExecCompatResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecCompatResponse.Merge(m, src) +} +func (m *MsgExecCompatResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExecCompatResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecCompatResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecCompatResponse proto.InternalMessageInfo + +// MsgExecCompat supports legacy amino codec for frontend metamask signing +// Functions are same as MsgExec, but input for msgs is array of strings +type MsgExecCompat struct { + Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` + Msgs []string `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty"` +} + +func (m *MsgExecCompat) Reset() { *m = MsgExecCompat{} } +func (m *MsgExecCompat) String() string { return proto.CompactTextString(m) } +func (*MsgExecCompat) ProtoMessage() {} +func (*MsgExecCompat) Descriptor() ([]byte, []int) { + return fileDescriptor_3ceddab7d8589ad1, []int{7} +} +func (m *MsgExecCompat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecCompat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecCompat.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 *MsgExecCompat) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecCompat.Merge(m, src) +} +func (m *MsgExecCompat) XXX_Size() int { + return m.Size() +} +func (m *MsgExecCompat) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecCompat.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecCompat proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgGrant)(nil), "cosmos.authz.v1beta1.MsgGrant") proto.RegisterType((*MsgExecResponse)(nil), "cosmos.authz.v1beta1.MsgExecResponse") @@ -277,47 +355,52 @@ func init() { proto.RegisterType((*MsgGrantResponse)(nil), "cosmos.authz.v1beta1.MsgGrantResponse") proto.RegisterType((*MsgRevoke)(nil), "cosmos.authz.v1beta1.MsgRevoke") proto.RegisterType((*MsgRevokeResponse)(nil), "cosmos.authz.v1beta1.MsgRevokeResponse") + proto.RegisterType((*MsgExecCompatResponse)(nil), "cosmos.authz.v1beta1.MsgExecCompatResponse") + proto.RegisterType((*MsgExecCompat)(nil), "cosmos.authz.v1beta1.MsgExecCompat") } func init() { proto.RegisterFile("cosmos/authz/v1beta1/tx.proto", fileDescriptor_3ceddab7d8589ad1) } var fileDescriptor_3ceddab7d8589ad1 = []byte{ - // 555 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x6f, 0x12, 0x4f, - 0x18, 0x66, 0x4a, 0x29, 0x3f, 0xa6, 0x4d, 0x7e, 0x76, 0x4b, 0xe2, 0x76, 0x9b, 0x6e, 0x37, 0x6b, - 0xab, 0x04, 0xc3, 0x4c, 0xc0, 0x1b, 0xf1, 0x52, 0x92, 0xc6, 0x8b, 0xc4, 0x64, 0xd5, 0x8b, 0x17, - 0xb2, 0xc0, 0x38, 0x25, 0x65, 0x77, 0xc8, 0xce, 0x42, 0xc0, 0x93, 0xf1, 0xe8, 0xc9, 0x8f, 0xa1, - 0x37, 0x0e, 0x3d, 0xfa, 0x01, 0x88, 0xa7, 0xc6, 0x83, 0xf1, 0x64, 0x14, 0x0e, 0x7c, 0x0c, 0xcd, - 0xce, 0x1f, 0xa4, 0x86, 0xd6, 0x9e, 0xbc, 0xc0, 0xbc, 0xef, 0xf3, 0xbc, 0xb3, 0xef, 0xf3, 0x3e, - 0x6f, 0x06, 0xee, 0xb7, 0x18, 0x0f, 0x18, 0xc7, 0x7e, 0x3f, 0x3e, 0x7d, 0x85, 0x07, 0xe5, 0x26, - 0x89, 0xfd, 0x32, 0x8e, 0x87, 0xa8, 0x17, 0xb1, 0x98, 0x19, 0x79, 0x09, 0x23, 0x01, 0x23, 0x05, - 0x5b, 0xbb, 0x32, 0xdb, 0x10, 0x1c, 0xac, 0x28, 0x22, 0xb0, 0xf2, 0x94, 0x51, 0x26, 0xf3, 0xc9, - 0x49, 0x65, 0x77, 0x29, 0x63, 0xb4, 0x4b, 0xb0, 0x88, 0x9a, 0xfd, 0x97, 0xd8, 0x0f, 0x47, 0x0a, - 0x72, 0x56, 0x36, 0x20, 0xbf, 0x27, 0x19, 0xb7, 0x15, 0x23, 0xe0, 0x14, 0x0f, 0xca, 0xc9, 0x9f, - 0x02, 0xb6, 0xfd, 0xa0, 0x13, 0x32, 0x2c, 0x7e, 0x65, 0xca, 0xfd, 0x02, 0xe0, 0x7f, 0x75, 0x4e, - 0x1f, 0x45, 0x7e, 0x18, 0x1b, 0x15, 0x98, 0xa5, 0xc9, 0x81, 0x44, 0x26, 0x70, 0x40, 0x21, 0x57, - 0x33, 0x3f, 0x9f, 0x97, 0xb4, 0xa2, 0xe3, 0x76, 0x3b, 0x22, 0x9c, 0x3f, 0x8d, 0xa3, 0x4e, 0x48, - 0x3d, 0x4d, 0xfc, 0x5d, 0x43, 0xcc, 0xb5, 0x9b, 0xd5, 0x10, 0xe3, 0x21, 0xcc, 0x88, 0xa3, 0x99, - 0x76, 0x40, 0x61, 0xb3, 0xb2, 0x87, 0x56, 0x0d, 0x0d, 0x89, 0x9e, 0x6a, 0xb9, 0xc9, 0xb7, 0x83, - 0xd4, 0xfb, 0xf9, 0xb8, 0x08, 0x3c, 0x59, 0x54, 0x3d, 0x7c, 0x33, 0x1f, 0x17, 0xf5, 0xf7, 0xdf, - 0xce, 0xc7, 0xc5, 0x1d, 0x59, 0x5e, 0xe2, 0xed, 0x33, 0xac, 0xb5, 0xb8, 0xf7, 0xe1, 0xff, 0x75, - 0x4e, 0x4f, 0x86, 0xa4, 0xe5, 0x11, 0xde, 0x63, 0x21, 0x27, 0x86, 0x09, 0xb3, 0x11, 0xe1, 0xfd, - 0x6e, 0xcc, 0x4d, 0xe0, 0xa4, 0x0b, 0x5b, 0x9e, 0x0e, 0xdd, 0x0f, 0x00, 0x66, 0x15, 0x7b, 0x59, - 0x10, 0xb8, 0xa9, 0xa0, 0x13, 0xb8, 0x1e, 0x70, 0xca, 0xcd, 0x35, 0x27, 0x5d, 0xd8, 0xac, 0xe4, - 0x91, 0x74, 0x0f, 0x69, 0xf7, 0xd0, 0x71, 0x38, 0xaa, 0xed, 0x7d, 0x3a, 0x2f, 0x29, 0x67, 0x50, - 0xd3, 0xe7, 0x64, 0xa1, 0xb3, 0xce, 0xa9, 0x27, 0xca, 0xab, 0x77, 0x96, 0x94, 0x91, 0x44, 0x99, - 0x71, 0x59, 0x59, 0xd2, 0x9f, 0x6b, 0xc0, 0x5b, 0x5a, 0xa4, 0x56, 0xe6, 0x7e, 0x04, 0x30, 0x97, - 0x5c, 0x43, 0x06, 0xec, 0x8c, 0xfc, 0x33, 0x1b, 0x1d, 0xb8, 0x15, 0x70, 0xda, 0x88, 0x47, 0x3d, - 0xd2, 0xe8, 0x47, 0x5d, 0xe1, 0x66, 0xce, 0x83, 0x01, 0xa7, 0xcf, 0x46, 0x3d, 0xf2, 0x3c, 0xea, - 0x56, 0x8f, 0xfe, 0xb4, 0x2a, 0x7f, 0x59, 0x90, 0x6c, 0xd8, 0xdd, 0x81, 0xdb, 0x8b, 0x40, 0x6b, - 0xaa, 0xfc, 0x04, 0x30, 0x5d, 0xe7, 0xd4, 0x78, 0x02, 0x33, 0x72, 0x3b, 0xed, 0xd5, 0x6b, 0xa2, - 0x87, 0x61, 0xdd, 0xbd, 0x1e, 0x5f, 0xac, 0xc1, 0x63, 0xb8, 0x2e, 0x8c, 0xde, 0xbf, 0x92, 0x9f, - 0xc0, 0xd6, 0xd1, 0xb5, 0xf0, 0xe2, 0x36, 0x0f, 0x6e, 0xa8, 0xb1, 0x1f, 0x5c, 0x59, 0x20, 0x09, - 0xd6, 0xbd, 0xbf, 0x10, 0xf4, 0x9d, 0x56, 0xe6, 0x75, 0xb2, 0xef, 0xb5, 0xda, 0xe4, 0x87, 0x9d, - 0x9a, 0x4c, 0x6d, 0x70, 0x31, 0xb5, 0xc1, 0xf7, 0xa9, 0x0d, 0xde, 0xcd, 0xec, 0xd4, 0xc5, 0xcc, - 0x4e, 0x7d, 0x9d, 0xd9, 0xa9, 0x17, 0x87, 0xb4, 0x13, 0x9f, 0xf6, 0x9b, 0xa8, 0xc5, 0x02, 0xf5, - 0xa2, 0xe0, 0xa5, 0xe1, 0x0e, 0xe5, 0x8b, 0xd0, 0xdc, 0x10, 0x3b, 0xf8, 0xe0, 0x57, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xbb, 0x9d, 0x9d, 0x9e, 0xb7, 0x04, 0x00, 0x00, + // 598 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xcf, 0x6f, 0x12, 0x41, + 0x14, 0x66, 0x4a, 0x29, 0x32, 0xad, 0xd1, 0x6e, 0x31, 0x6e, 0xb7, 0xe9, 0x76, 0xb3, 0x6d, 0x95, + 0xd0, 0xb0, 0x1b, 0xf0, 0x46, 0xbc, 0x14, 0xd3, 0x78, 0x91, 0x98, 0xac, 0x7a, 0xf1, 0x20, 0x59, + 0x60, 0x9c, 0x92, 0xb2, 0x3b, 0x64, 0x67, 0x21, 0x60, 0x3c, 0x18, 0x8f, 0x9e, 0xfc, 0x33, 0xf4, + 0xc6, 0xa1, 0x47, 0xff, 0x00, 0xe2, 0xa9, 0xf1, 0x60, 0x3c, 0xf9, 0x03, 0x0e, 0xfc, 0x1b, 0x66, + 0x67, 0x66, 0xd7, 0xc5, 0x50, 0x44, 0x0f, 0x5e, 0x60, 0xde, 0xfb, 0xbe, 0xf7, 0xf6, 0x7d, 0xf3, + 0xcd, 0x0c, 0xdc, 0x6d, 0x10, 0xea, 0x10, 0x6a, 0xda, 0x5d, 0xff, 0xf4, 0x85, 0xd9, 0x2b, 0xd6, + 0x91, 0x6f, 0x17, 0x4d, 0xbf, 0x6f, 0x74, 0x3c, 0xe2, 0x13, 0x29, 0xcb, 0x61, 0x83, 0xc1, 0x86, + 0x80, 0x95, 0x6d, 0x9e, 0xad, 0x31, 0x8e, 0x29, 0x28, 0x2c, 0x50, 0xb2, 0x98, 0x60, 0xc2, 0xf3, + 0xc1, 0x4a, 0x64, 0xb7, 0x31, 0x21, 0xb8, 0x8d, 0x4c, 0x16, 0xd5, 0xbb, 0xcf, 0x4d, 0xdb, 0x1d, + 0x08, 0x48, 0x9b, 0x3b, 0x00, 0xff, 0x1e, 0x67, 0xdc, 0x14, 0x0c, 0x87, 0x62, 0xb3, 0x57, 0x0c, + 0xfe, 0x04, 0xb0, 0x69, 0x3b, 0x2d, 0x97, 0x98, 0xec, 0x97, 0xa7, 0xf4, 0xcf, 0x00, 0x5e, 0xa9, + 0x52, 0x7c, 0xdf, 0xb3, 0x5d, 0x5f, 0x2a, 0xc1, 0x34, 0x0e, 0x16, 0xc8, 0x93, 0x81, 0x06, 0x72, + 0x99, 0x8a, 0xfc, 0xe9, 0xbc, 0x10, 0x2a, 0x3a, 0x6e, 0x36, 0x3d, 0x44, 0xe9, 0x23, 0xdf, 0x6b, + 0xb9, 0xd8, 0x0a, 0x89, 0xbf, 0x6a, 0x90, 0xbc, 0xb2, 0x5c, 0x0d, 0x92, 0xee, 0xc2, 0x14, 0x5b, + 0xca, 0x49, 0x0d, 0xe4, 0xd6, 0x4b, 0x3b, 0xc6, 0xbc, 0x4d, 0x33, 0xd8, 0x4c, 0x95, 0xcc, 0xe8, + 0xeb, 0x5e, 0xe2, 0xdd, 0x74, 0x98, 0x07, 0x16, 0x2f, 0x2a, 0x1f, 0xbc, 0x9e, 0x0e, 0xf3, 0xe1, + 0xf7, 0xdf, 0x4c, 0x87, 0xf9, 0x2d, 0x5e, 0x5e, 0xa0, 0xcd, 0x33, 0x33, 0xd4, 0xa2, 0x1f, 0xc1, + 0x6b, 0x55, 0x8a, 0x4f, 0xfa, 0xa8, 0x61, 0x21, 0xda, 0x21, 0x2e, 0x45, 0x92, 0x0c, 0xd3, 0x1e, + 0xa2, 0xdd, 0xb6, 0x4f, 0x65, 0xa0, 0x25, 0x73, 0x1b, 0x56, 0x18, 0xea, 0xef, 0x01, 0x4c, 0x0b, + 0x76, 0x5c, 0x10, 0x58, 0x56, 0xd0, 0x09, 0x5c, 0x75, 0x28, 0xa6, 0xf2, 0x8a, 0x96, 0xcc, 0xad, + 0x97, 0xb2, 0x06, 0x77, 0xcf, 0x08, 0xdd, 0x33, 0x8e, 0xdd, 0x41, 0x65, 0xe7, 0xe3, 0x79, 0x41, + 0x38, 0x63, 0xd4, 0x6d, 0x8a, 0x22, 0x9d, 0x55, 0x8a, 0x2d, 0x56, 0x5e, 0xde, 0x8f, 0x29, 0x43, + 0x81, 0x32, 0x69, 0x56, 0x59, 0x30, 0x9f, 0x2e, 0xc1, 0xeb, 0xa1, 0xc8, 0x50, 0x99, 0xfe, 0x01, + 0xc0, 0x4c, 0xd0, 0x06, 0xf5, 0xc8, 0x19, 0xfa, 0x6f, 0x36, 0x6a, 0x70, 0xc3, 0xa1, 0xb8, 0xe6, + 0x0f, 0x3a, 0xa8, 0xd6, 0xf5, 0xda, 0xcc, 0xcd, 0x8c, 0x05, 0x1d, 0x8a, 0x1f, 0x0f, 0x3a, 0xe8, + 0x89, 0xd7, 0x2e, 0x1f, 0xfe, 0x6e, 0x55, 0x76, 0x56, 0x10, 0x1f, 0x58, 0xdf, 0x82, 0x9b, 0x51, + 0x10, 0x69, 0x2a, 0xc2, 0x1b, 0x42, 0xf2, 0x3d, 0xe2, 0x74, 0x6c, 0x7f, 0x09, 0x1b, 0x5f, 0xc2, + 0xab, 0x33, 0x25, 0xff, 0xe4, 0xa5, 0x14, 0xf3, 0x32, 0xf3, 0x17, 0xc6, 0x94, 0xbe, 0xad, 0xc0, + 0x64, 0x95, 0x62, 0xe9, 0x21, 0x4c, 0xf1, 0xeb, 0xa4, 0xce, 0x3f, 0xd7, 0xa1, 0x7b, 0xca, 0xad, + 0xc5, 0x78, 0x24, 0xf8, 0x01, 0x5c, 0x65, 0x27, 0x73, 0xf7, 0x52, 0x7e, 0x00, 0x2b, 0x87, 0x0b, + 0xe1, 0xa8, 0x9b, 0x05, 0xd7, 0xc4, 0x39, 0xd9, 0xbb, 0xb4, 0x80, 0x13, 0x94, 0xdb, 0x7f, 0x20, + 0x44, 0x3d, 0x9f, 0x41, 0x18, 0xdb, 0xf5, 0xfd, 0x85, 0x83, 0x70, 0x92, 0x72, 0xb4, 0x04, 0x29, + 0xec, 0xaf, 0xa4, 0x5e, 0x05, 0x0f, 0x40, 0xa5, 0x32, 0xfa, 0xa1, 0x26, 0x46, 0x63, 0x15, 0x5c, + 0x8c, 0x55, 0xf0, 0x7d, 0xac, 0x82, 0xb7, 0x13, 0x35, 0x71, 0x31, 0x51, 0x13, 0x5f, 0x26, 0x6a, + 0xe2, 0xe9, 0x01, 0x6e, 0xf9, 0xa7, 0xdd, 0xba, 0xd1, 0x20, 0x8e, 0x78, 0x62, 0xcd, 0x98, 0x4b, + 0x7d, 0xfe, 0x44, 0xd6, 0xd7, 0xd8, 0xa5, 0xbc, 0xf3, 0x33, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x68, + 0x07, 0xf8, 0xc8, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -344,6 +427,7 @@ type MsgClient interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) + ExecCompat(ctx context.Context, in *MsgExecCompat, opts ...grpc.CallOption) (*MsgExecCompatResponse, error) } type msgClient struct { @@ -381,6 +465,15 @@ func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.Call return out, nil } +func (c *msgClient) ExecCompat(ctx context.Context, in *MsgExecCompat, opts ...grpc.CallOption) (*MsgExecCompatResponse, error) { + out := new(MsgExecCompatResponse) + err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/ExecCompat", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // Grant grants the provided authorization to the grantee on the granter's @@ -395,6 +488,7 @@ type MsgServer interface { // Revoke revokes any authorization corresponding to the provided method name on the // granter's account that has been granted to the grantee. Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) + ExecCompat(context.Context, *MsgExecCompat) (*MsgExecCompatResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -410,6 +504,9 @@ func (*UnimplementedMsgServer) Exec(ctx context.Context, req *MsgExec) (*MsgExec func (*UnimplementedMsgServer) Revoke(ctx context.Context, req *MsgRevoke) (*MsgRevokeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } +func (*UnimplementedMsgServer) ExecCompat(ctx context.Context, req *MsgExecCompat) (*MsgExecCompatResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecCompat not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -469,6 +566,24 @@ func _Msg_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interfac return interceptor(ctx, in, info, handler) } +func _Msg_ExecCompat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExecCompat) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExecCompat(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.authz.v1beta1.Msg/ExecCompat", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExecCompat(ctx, req.(*MsgExecCompat)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.authz.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -485,6 +600,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Revoke", Handler: _Msg_Revoke_Handler, }, + { + MethodName: "ExecCompat", + Handler: _Msg_ExecCompat_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/authz/v1beta1/tx.proto", @@ -703,6 +822,77 @@ func (m *MsgRevokeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgExecCompatResponse) 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 *MsgExecCompatResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecCompatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Results[iNdEx]) + copy(dAtA[i:], m.Results[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Results[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgExecCompat) 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 *MsgExecCompat) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecCompat) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Msgs) > 0 { + for iNdEx := len(m.Msgs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Msgs[iNdEx]) + copy(dAtA[i:], m.Msgs[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Msgs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Grantee) > 0 { + i -= len(m.Grantee) + copy(dAtA[i:], m.Grantee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -806,6 +996,40 @@ func (m *MsgRevokeResponse) Size() (n int) { return n } +func (m *MsgExecCompatResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, b := range m.Results { + l = len(b) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgExecCompat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Grantee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Msgs) > 0 { + for _, s := range m.Msgs { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1403,6 +1627,202 @@ func (m *MsgRevokeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgExecCompatResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecCompatResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecCompatResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, make([]byte, postIndex-iNdEx)) + copy(m.Results[len(m.Results)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecCompat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecCompat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecCompat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Grantee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msgs = append(m.Msgs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0