From ad419351c962ea81f9f870055dda84cfe246490e Mon Sep 17 00:00:00 2001 From: Dreamer Date: Fri, 26 Jul 2024 10:07:08 +0800 Subject: [PATCH] add missing module --- api/irita/tibc/module/v1/module.pulsar.go | 576 +++ api/irita/tibc/tx.pulsar.go | 4468 +++++++++++++++++++++ api/irita/tibc/tx_grpc.pb.go | 228 ++ app/app_config.go | 41 +- app/app_v2.go | 56 +- go.mod | 6 +- go.sum | 4 +- modules/tibc/depinject.go | 106 + proto/buf.gen.pulsar.yaml | 19 + proto/irita/tibc/module/v1/module.proto | 16 + scripts/protocgen-pulsar.sh | 16 + scripts/protocgen.sh | 2 + wrapper/provider.go | 37 + wrapper/staking.go | 19 +- 14 files changed, 5548 insertions(+), 46 deletions(-) create mode 100644 api/irita/tibc/module/v1/module.pulsar.go create mode 100644 api/irita/tibc/tx.pulsar.go create mode 100644 api/irita/tibc/tx_grpc.pb.go create mode 100644 modules/tibc/depinject.go create mode 100644 proto/buf.gen.pulsar.yaml create mode 100644 proto/irita/tibc/module/v1/module.proto create mode 100755 scripts/protocgen-pulsar.sh create mode 100644 wrapper/provider.go diff --git a/api/irita/tibc/module/v1/module.pulsar.go b/api/irita/tibc/module/v1/module.pulsar.go new file mode 100644 index 0000000..45e604d --- /dev/null +++ b/api/irita/tibc/module/v1/module.pulsar.go @@ -0,0 +1,576 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + 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 ( + md_Module protoreflect.MessageDescriptor + fd_Module_authority protoreflect.FieldDescriptor +) + +func init() { + file_irita_tibc_module_v1_module_proto_init() + md_Module = File_irita_tibc_module_v1_module_proto.Messages().ByName("Module") + fd_Module_authority = md_Module.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_module_v1_module_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_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// 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_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(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_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, 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_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.module.v1.Module.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.module.v1.Module")) + } + panic(fmt.Errorf("message tibc.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.module.v1.Module.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.module.v1.Module")) + } + panic(fmt.Errorf("message tibc.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.module.v1.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.module.v1.Module")) + } + panic(fmt.Errorf("message tibc.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.module.v1.Module.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.module.v1.Module")) + } + panic(fmt.Errorf("message tibc.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.module.v1.Module.authority": + panic(fmt.Errorf("field authority of message tibc.module.v1.Module is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.module.v1.Module")) + } + panic(fmt.Errorf("message tibc.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.module.v1.Module.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.module.v1.Module")) + } + panic(fmt.Errorf("message tibc.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + 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.Authority) + 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().(*Module) + 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.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*Module) + 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: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: 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 Authority", 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.Authority = 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: irita/tibc/module/v1/module.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) +) + +// Module is the config object of the tibc module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority defines the custom module authority. If not set, defaults to the + // governance module. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_irita_tibc_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +var File_irita_tibc_module_v1_module_proto protoreflect.FileDescriptor + +var file_irita_tibc_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2f, 0xba, + 0xc0, 0x96, 0xda, 0x01, 0x29, 0x0a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x74, + 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x42, 0xab, + 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2f, 0x74, 0x69, 0x62, + 0x63, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x4d, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x69, 0x62, + 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x69, + 0x62, 0x63, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x54, + 0x69, 0x62, 0x63, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x54, 0x69, 0x62, 0x63, + 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_irita_tibc_module_v1_module_proto_rawDescOnce sync.Once + file_irita_tibc_module_v1_module_proto_rawDescData = file_irita_tibc_module_v1_module_proto_rawDesc +) + +func file_irita_tibc_module_v1_module_proto_rawDescGZIP() []byte { + file_irita_tibc_module_v1_module_proto_rawDescOnce.Do(func() { + file_irita_tibc_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_irita_tibc_module_v1_module_proto_rawDescData) + }) + return file_irita_tibc_module_v1_module_proto_rawDescData +} + +var file_irita_tibc_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_irita_tibc_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: tibc.module.v1.Module +} +var file_irita_tibc_module_v1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_irita_tibc_module_v1_module_proto_init() } +func file_irita_tibc_module_v1_module_proto_init() { + if File_irita_tibc_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_irita_tibc_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); 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_irita_tibc_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_irita_tibc_module_v1_module_proto_goTypes, + DependencyIndexes: file_irita_tibc_module_v1_module_proto_depIdxs, + MessageInfos: file_irita_tibc_module_v1_module_proto_msgTypes, + }.Build() + File_irita_tibc_module_v1_module_proto = out.File + file_irita_tibc_module_v1_module_proto_rawDesc = nil + file_irita_tibc_module_v1_module_proto_goTypes = nil + file_irita_tibc_module_v1_module_proto_depIdxs = nil +} diff --git a/api/irita/tibc/tx.pulsar.go b/api/irita/tibc/tx.pulsar.go new file mode 100644 index 0000000..c24520b --- /dev/null +++ b/api/irita/tibc/tx.pulsar.go @@ -0,0 +1,4468 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tibc + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + 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" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgCreateClient protoreflect.MessageDescriptor + fd_MsgCreateClient_chainName protoreflect.FieldDescriptor + fd_MsgCreateClient_clientState protoreflect.FieldDescriptor + fd_MsgCreateClient_consensusState protoreflect.FieldDescriptor + fd_MsgCreateClient_signer protoreflect.FieldDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgCreateClient = File_irita_tibc_tx_proto.Messages().ByName("MsgCreateClient") + fd_MsgCreateClient_chainName = md_MsgCreateClient.Fields().ByName("chainName") + fd_MsgCreateClient_clientState = md_MsgCreateClient.Fields().ByName("clientState") + fd_MsgCreateClient_consensusState = md_MsgCreateClient.Fields().ByName("consensusState") + fd_MsgCreateClient_signer = md_MsgCreateClient.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateClient)(nil) + +type fastReflection_MsgCreateClient MsgCreateClient + +func (x *MsgCreateClient) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateClient)(x) +} + +func (x *MsgCreateClient) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_tx_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_MsgCreateClient_messageType fastReflection_MsgCreateClient_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateClient_messageType{} + +type fastReflection_MsgCreateClient_messageType struct{} + +func (x fastReflection_MsgCreateClient_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateClient)(nil) +} +func (x fastReflection_MsgCreateClient_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateClient) +} +func (x fastReflection_MsgCreateClient_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClient +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateClient) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClient +} + +// 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_MsgCreateClient) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateClient_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateClient) New() protoreflect.Message { + return new(fastReflection_MsgCreateClient) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateClient) Interface() protoreflect.ProtoMessage { + return (*MsgCreateClient)(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_MsgCreateClient) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_MsgCreateClient_chainName, value) { + return + } + } + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_MsgCreateClient_clientState, value) { + return + } + } + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_MsgCreateClient_consensusState, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgCreateClient_signer, 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_MsgCreateClient) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irita.tibc.MsgCreateClient.chainName": + return x.ChainName != "" + case "irita.tibc.MsgCreateClient.clientState": + return x.ClientState != nil + case "irita.tibc.MsgCreateClient.consensusState": + return x.ConsensusState != nil + case "irita.tibc.MsgCreateClient.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClient 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_MsgCreateClient) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irita.tibc.MsgCreateClient.chainName": + x.ChainName = "" + case "irita.tibc.MsgCreateClient.clientState": + x.ClientState = nil + case "irita.tibc.MsgCreateClient.consensusState": + x.ConsensusState = nil + case "irita.tibc.MsgCreateClient.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClient 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_MsgCreateClient) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irita.tibc.MsgCreateClient.chainName": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "irita.tibc.MsgCreateClient.clientState": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irita.tibc.MsgCreateClient.consensusState": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irita.tibc.MsgCreateClient.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClient 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_MsgCreateClient) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irita.tibc.MsgCreateClient.chainName": + x.ChainName = value.Interface().(string) + case "irita.tibc.MsgCreateClient.clientState": + x.ClientState = value.Message().Interface().(*anypb.Any) + case "irita.tibc.MsgCreateClient.consensusState": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + case "irita.tibc.MsgCreateClient.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClient 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_MsgCreateClient) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgCreateClient.clientState": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "irita.tibc.MsgCreateClient.consensusState": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + case "irita.tibc.MsgCreateClient.chainName": + panic(fmt.Errorf("field chainName of message irita.tibc.MsgCreateClient is not mutable")) + case "irita.tibc.MsgCreateClient.signer": + panic(fmt.Errorf("field signer of message irita.tibc.MsgCreateClient is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClient 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_MsgCreateClient) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgCreateClient.chainName": + return protoreflect.ValueOfString("") + case "irita.tibc.MsgCreateClient.clientState": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irita.tibc.MsgCreateClient.consensusState": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irita.tibc.MsgCreateClient.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClient 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_MsgCreateClient) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgCreateClient", 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_MsgCreateClient) 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_MsgCreateClient) 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_MsgCreateClient) 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_MsgCreateClient) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateClient) + 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.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + 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().(*MsgCreateClient) + 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.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x22 + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + 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().(*MsgCreateClient) + 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: MsgCreateClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateClient: 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 ChainName", 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.ChainName = 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 ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCreateClientResponse protoreflect.MessageDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgCreateClientResponse = File_irita_tibc_tx_proto.Messages().ByName("MsgCreateClientResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateClientResponse)(nil) + +type fastReflection_MsgCreateClientResponse MsgCreateClientResponse + +func (x *MsgCreateClientResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateClientResponse)(x) +} + +func (x *MsgCreateClientResponse) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_tx_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_MsgCreateClientResponse_messageType fastReflection_MsgCreateClientResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateClientResponse_messageType{} + +type fastReflection_MsgCreateClientResponse_messageType struct{} + +func (x fastReflection_MsgCreateClientResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateClientResponse)(nil) +} +func (x fastReflection_MsgCreateClientResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateClientResponse) +} +func (x fastReflection_MsgCreateClientResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClientResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateClientResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClientResponse +} + +// 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_MsgCreateClientResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateClientResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateClientResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateClientResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateClientResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateClientResponse)(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_MsgCreateClientResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCreateClientResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClientResponse 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_MsgCreateClientResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClientResponse 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_MsgCreateClientResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClientResponse 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_MsgCreateClientResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClientResponse 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_MsgCreateClientResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClientResponse 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_MsgCreateClientResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgCreateClientResponse 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_MsgCreateClientResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgCreateClientResponse", 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_MsgCreateClientResponse) 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_MsgCreateClientResponse) 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_MsgCreateClientResponse) 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_MsgCreateClientResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateClientResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateClientResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateClientResponse) + 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: MsgCreateClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpgradeClient protoreflect.MessageDescriptor + fd_MsgUpgradeClient_chainName protoreflect.FieldDescriptor + fd_MsgUpgradeClient_clientState protoreflect.FieldDescriptor + fd_MsgUpgradeClient_consensusState protoreflect.FieldDescriptor + fd_MsgUpgradeClient_signer protoreflect.FieldDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgUpgradeClient = File_irita_tibc_tx_proto.Messages().ByName("MsgUpgradeClient") + fd_MsgUpgradeClient_chainName = md_MsgUpgradeClient.Fields().ByName("chainName") + fd_MsgUpgradeClient_clientState = md_MsgUpgradeClient.Fields().ByName("clientState") + fd_MsgUpgradeClient_consensusState = md_MsgUpgradeClient.Fields().ByName("consensusState") + fd_MsgUpgradeClient_signer = md_MsgUpgradeClient.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpgradeClient)(nil) + +type fastReflection_MsgUpgradeClient MsgUpgradeClient + +func (x *MsgUpgradeClient) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpgradeClient)(x) +} + +func (x *MsgUpgradeClient) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpgradeClient_messageType fastReflection_MsgUpgradeClient_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpgradeClient_messageType{} + +type fastReflection_MsgUpgradeClient_messageType struct{} + +func (x fastReflection_MsgUpgradeClient_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpgradeClient)(nil) +} +func (x fastReflection_MsgUpgradeClient_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClient) +} +func (x fastReflection_MsgUpgradeClient_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClient +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpgradeClient) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClient +} + +// 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_MsgUpgradeClient) Type() protoreflect.MessageType { + return _fastReflection_MsgUpgradeClient_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpgradeClient) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClient) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpgradeClient) Interface() protoreflect.ProtoMessage { + return (*MsgUpgradeClient)(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_MsgUpgradeClient) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_MsgUpgradeClient_chainName, value) { + return + } + } + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_MsgUpgradeClient_clientState, value) { + return + } + } + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_MsgUpgradeClient_consensusState, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgUpgradeClient_signer, 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_MsgUpgradeClient) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irita.tibc.MsgUpgradeClient.chainName": + return x.ChainName != "" + case "irita.tibc.MsgUpgradeClient.clientState": + return x.ClientState != nil + case "irita.tibc.MsgUpgradeClient.consensusState": + return x.ConsensusState != nil + case "irita.tibc.MsgUpgradeClient.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClient 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_MsgUpgradeClient) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irita.tibc.MsgUpgradeClient.chainName": + x.ChainName = "" + case "irita.tibc.MsgUpgradeClient.clientState": + x.ClientState = nil + case "irita.tibc.MsgUpgradeClient.consensusState": + x.ConsensusState = nil + case "irita.tibc.MsgUpgradeClient.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClient 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_MsgUpgradeClient) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irita.tibc.MsgUpgradeClient.chainName": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "irita.tibc.MsgUpgradeClient.clientState": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irita.tibc.MsgUpgradeClient.consensusState": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "irita.tibc.MsgUpgradeClient.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClient 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_MsgUpgradeClient) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irita.tibc.MsgUpgradeClient.chainName": + x.ChainName = value.Interface().(string) + case "irita.tibc.MsgUpgradeClient.clientState": + x.ClientState = value.Message().Interface().(*anypb.Any) + case "irita.tibc.MsgUpgradeClient.consensusState": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + case "irita.tibc.MsgUpgradeClient.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClient 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_MsgUpgradeClient) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgUpgradeClient.clientState": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "irita.tibc.MsgUpgradeClient.consensusState": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + case "irita.tibc.MsgUpgradeClient.chainName": + panic(fmt.Errorf("field chainName of message irita.tibc.MsgUpgradeClient is not mutable")) + case "irita.tibc.MsgUpgradeClient.signer": + panic(fmt.Errorf("field signer of message irita.tibc.MsgUpgradeClient is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClient 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_MsgUpgradeClient) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgUpgradeClient.chainName": + return protoreflect.ValueOfString("") + case "irita.tibc.MsgUpgradeClient.clientState": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irita.tibc.MsgUpgradeClient.consensusState": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "irita.tibc.MsgUpgradeClient.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClient")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClient 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_MsgUpgradeClient) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgUpgradeClient", 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_MsgUpgradeClient) 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_MsgUpgradeClient) 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_MsgUpgradeClient) 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_MsgUpgradeClient) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpgradeClient) + 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.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + 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().(*MsgUpgradeClient) + 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.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x22 + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + 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().(*MsgUpgradeClient) + 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: MsgUpgradeClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpgradeClient: 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 ChainName", 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.ChainName = 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 ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpgradeClientResponse protoreflect.MessageDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgUpgradeClientResponse = File_irita_tibc_tx_proto.Messages().ByName("MsgUpgradeClientResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpgradeClientResponse)(nil) + +type fastReflection_MsgUpgradeClientResponse MsgUpgradeClientResponse + +func (x *MsgUpgradeClientResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpgradeClientResponse)(x) +} + +func (x *MsgUpgradeClientResponse) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpgradeClientResponse_messageType fastReflection_MsgUpgradeClientResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpgradeClientResponse_messageType{} + +type fastReflection_MsgUpgradeClientResponse_messageType struct{} + +func (x fastReflection_MsgUpgradeClientResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpgradeClientResponse)(nil) +} +func (x fastReflection_MsgUpgradeClientResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClientResponse) +} +func (x fastReflection_MsgUpgradeClientResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClientResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpgradeClientResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClientResponse +} + +// 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_MsgUpgradeClientResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpgradeClientResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpgradeClientResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClientResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpgradeClientResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpgradeClientResponse)(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_MsgUpgradeClientResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpgradeClientResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClientResponse 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_MsgUpgradeClientResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClientResponse 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_MsgUpgradeClientResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClientResponse 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_MsgUpgradeClientResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClientResponse 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_MsgUpgradeClientResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClientResponse 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_MsgUpgradeClientResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgUpgradeClientResponse 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_MsgUpgradeClientResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgUpgradeClientResponse", 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_MsgUpgradeClientResponse) 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_MsgUpgradeClientResponse) 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_MsgUpgradeClientResponse) 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_MsgUpgradeClientResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpgradeClientResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpgradeClientResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpgradeClientResponse) + 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: MsgUpgradeClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpgradeClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgRegisterRelayer_2_list)(nil) + +type _MsgRegisterRelayer_2_list struct { + list *[]string +} + +func (x *_MsgRegisterRelayer_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterRelayer_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgRegisterRelayer_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterRelayer_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterRelayer_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterRelayer at list field Relayers as it is not of Message kind")) +} + +func (x *_MsgRegisterRelayer_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterRelayer_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRegisterRelayer_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRegisterRelayer protoreflect.MessageDescriptor + fd_MsgRegisterRelayer_chain_name protoreflect.FieldDescriptor + fd_MsgRegisterRelayer_relayers protoreflect.FieldDescriptor + fd_MsgRegisterRelayer_signer protoreflect.FieldDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgRegisterRelayer = File_irita_tibc_tx_proto.Messages().ByName("MsgRegisterRelayer") + fd_MsgRegisterRelayer_chain_name = md_MsgRegisterRelayer.Fields().ByName("chain_name") + fd_MsgRegisterRelayer_relayers = md_MsgRegisterRelayer.Fields().ByName("relayers") + fd_MsgRegisterRelayer_signer = md_MsgRegisterRelayer.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterRelayer)(nil) + +type fastReflection_MsgRegisterRelayer MsgRegisterRelayer + +func (x *MsgRegisterRelayer) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayer)(x) +} + +func (x *MsgRegisterRelayer) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterRelayer_messageType fastReflection_MsgRegisterRelayer_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterRelayer_messageType{} + +type fastReflection_MsgRegisterRelayer_messageType struct{} + +func (x fastReflection_MsgRegisterRelayer_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayer)(nil) +} +func (x fastReflection_MsgRegisterRelayer_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayer) +} +func (x fastReflection_MsgRegisterRelayer_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayer +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterRelayer) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayer +} + +// 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_MsgRegisterRelayer) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterRelayer_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterRelayer) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayer) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterRelayer) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterRelayer)(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_MsgRegisterRelayer) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_MsgRegisterRelayer_chain_name, value) { + return + } + } + if len(x.Relayers) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterRelayer_2_list{list: &x.Relayers}) + if !f(fd_MsgRegisterRelayer_relayers, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgRegisterRelayer_signer, 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_MsgRegisterRelayer) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irita.tibc.MsgRegisterRelayer.chain_name": + return x.ChainName != "" + case "irita.tibc.MsgRegisterRelayer.relayers": + return len(x.Relayers) != 0 + case "irita.tibc.MsgRegisterRelayer.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayer 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_MsgRegisterRelayer) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irita.tibc.MsgRegisterRelayer.chain_name": + x.ChainName = "" + case "irita.tibc.MsgRegisterRelayer.relayers": + x.Relayers = nil + case "irita.tibc.MsgRegisterRelayer.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayer 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_MsgRegisterRelayer) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irita.tibc.MsgRegisterRelayer.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "irita.tibc.MsgRegisterRelayer.relayers": + if len(x.Relayers) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterRelayer_2_list{}) + } + listValue := &_MsgRegisterRelayer_2_list{list: &x.Relayers} + return protoreflect.ValueOfList(listValue) + case "irita.tibc.MsgRegisterRelayer.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayer 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_MsgRegisterRelayer) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irita.tibc.MsgRegisterRelayer.chain_name": + x.ChainName = value.Interface().(string) + case "irita.tibc.MsgRegisterRelayer.relayers": + lv := value.List() + clv := lv.(*_MsgRegisterRelayer_2_list) + x.Relayers = *clv.list + case "irita.tibc.MsgRegisterRelayer.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayer 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_MsgRegisterRelayer) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgRegisterRelayer.relayers": + if x.Relayers == nil { + x.Relayers = []string{} + } + value := &_MsgRegisterRelayer_2_list{list: &x.Relayers} + return protoreflect.ValueOfList(value) + case "irita.tibc.MsgRegisterRelayer.chain_name": + panic(fmt.Errorf("field chain_name of message irita.tibc.MsgRegisterRelayer is not mutable")) + case "irita.tibc.MsgRegisterRelayer.signer": + panic(fmt.Errorf("field signer of message irita.tibc.MsgRegisterRelayer is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayer 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_MsgRegisterRelayer) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgRegisterRelayer.chain_name": + return protoreflect.ValueOfString("") + case "irita.tibc.MsgRegisterRelayer.relayers": + list := []string{} + return protoreflect.ValueOfList(&_MsgRegisterRelayer_2_list{list: &list}) + case "irita.tibc.MsgRegisterRelayer.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayer 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_MsgRegisterRelayer) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgRegisterRelayer", 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_MsgRegisterRelayer) 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_MsgRegisterRelayer) 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_MsgRegisterRelayer) 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_MsgRegisterRelayer) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterRelayer) + 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.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Relayers) > 0 { + for _, s := range x.Relayers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Signer) + 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().(*MsgRegisterRelayer) + 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.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x1a + } + if len(x.Relayers) > 0 { + for iNdEx := len(x.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Relayers[iNdEx]) + copy(dAtA[i:], x.Relayers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + 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().(*MsgRegisterRelayer) + 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: MsgRegisterRelayer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterRelayer: 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 ChainName", 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.ChainName = 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 Relayers", 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.Relayers = append(x.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRegisterRelayerResponse protoreflect.MessageDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgRegisterRelayerResponse = File_irita_tibc_tx_proto.Messages().ByName("MsgRegisterRelayerResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterRelayerResponse)(nil) + +type fastReflection_MsgRegisterRelayerResponse MsgRegisterRelayerResponse + +func (x *MsgRegisterRelayerResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayerResponse)(x) +} + +func (x *MsgRegisterRelayerResponse) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterRelayerResponse_messageType fastReflection_MsgRegisterRelayerResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterRelayerResponse_messageType{} + +type fastReflection_MsgRegisterRelayerResponse_messageType struct{} + +func (x fastReflection_MsgRegisterRelayerResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayerResponse)(nil) +} +func (x fastReflection_MsgRegisterRelayerResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayerResponse) +} +func (x fastReflection_MsgRegisterRelayerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayerResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterRelayerResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayerResponse +} + +// 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_MsgRegisterRelayerResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterRelayerResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterRelayerResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayerResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterRelayerResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterRelayerResponse)(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_MsgRegisterRelayerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterRelayerResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayerResponse 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_MsgRegisterRelayerResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayerResponse 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_MsgRegisterRelayerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayerResponse 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_MsgRegisterRelayerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayerResponse 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_MsgRegisterRelayerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayerResponse 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_MsgRegisterRelayerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgRegisterRelayerResponse 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_MsgRegisterRelayerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgRegisterRelayerResponse", 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_MsgRegisterRelayerResponse) 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_MsgRegisterRelayerResponse) 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_MsgRegisterRelayerResponse) 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_MsgRegisterRelayerResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterRelayerResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterRelayerResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterRelayerResponse) + 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: MsgRegisterRelayerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterRelayerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgSetRoutingRules_1_list)(nil) + +type _MsgSetRoutingRules_1_list struct { + list *[]string +} + +func (x *_MsgSetRoutingRules_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgSetRoutingRules_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgSetRoutingRules_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgSetRoutingRules_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgSetRoutingRules_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgSetRoutingRules at list field Rules as it is not of Message kind")) +} + +func (x *_MsgSetRoutingRules_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgSetRoutingRules_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgSetRoutingRules_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgSetRoutingRules protoreflect.MessageDescriptor + fd_MsgSetRoutingRules_rules protoreflect.FieldDescriptor + fd_MsgSetRoutingRules_signer protoreflect.FieldDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgSetRoutingRules = File_irita_tibc_tx_proto.Messages().ByName("MsgSetRoutingRules") + fd_MsgSetRoutingRules_rules = md_MsgSetRoutingRules.Fields().ByName("rules") + fd_MsgSetRoutingRules_signer = md_MsgSetRoutingRules.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetRoutingRules)(nil) + +type fastReflection_MsgSetRoutingRules MsgSetRoutingRules + +func (x *MsgSetRoutingRules) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRules)(x) +} + +func (x *MsgSetRoutingRules) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_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_MsgSetRoutingRules_messageType fastReflection_MsgSetRoutingRules_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetRoutingRules_messageType{} + +type fastReflection_MsgSetRoutingRules_messageType struct{} + +func (x fastReflection_MsgSetRoutingRules_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRules)(nil) +} +func (x fastReflection_MsgSetRoutingRules_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRules) +} +func (x fastReflection_MsgSetRoutingRules_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRules +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetRoutingRules) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRules +} + +// 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_MsgSetRoutingRules) Type() protoreflect.MessageType { + return _fastReflection_MsgSetRoutingRules_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetRoutingRules) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRules) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetRoutingRules) Interface() protoreflect.ProtoMessage { + return (*MsgSetRoutingRules)(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_MsgSetRoutingRules) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rules) != 0 { + value := protoreflect.ValueOfList(&_MsgSetRoutingRules_1_list{list: &x.Rules}) + if !f(fd_MsgSetRoutingRules_rules, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgSetRoutingRules_signer, 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_MsgSetRoutingRules) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "irita.tibc.MsgSetRoutingRules.rules": + return len(x.Rules) != 0 + case "irita.tibc.MsgSetRoutingRules.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRules 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_MsgSetRoutingRules) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "irita.tibc.MsgSetRoutingRules.rules": + x.Rules = nil + case "irita.tibc.MsgSetRoutingRules.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRules 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_MsgSetRoutingRules) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "irita.tibc.MsgSetRoutingRules.rules": + if len(x.Rules) == 0 { + return protoreflect.ValueOfList(&_MsgSetRoutingRules_1_list{}) + } + listValue := &_MsgSetRoutingRules_1_list{list: &x.Rules} + return protoreflect.ValueOfList(listValue) + case "irita.tibc.MsgSetRoutingRules.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRules 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_MsgSetRoutingRules) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "irita.tibc.MsgSetRoutingRules.rules": + lv := value.List() + clv := lv.(*_MsgSetRoutingRules_1_list) + x.Rules = *clv.list + case "irita.tibc.MsgSetRoutingRules.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRules 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_MsgSetRoutingRules) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgSetRoutingRules.rules": + if x.Rules == nil { + x.Rules = []string{} + } + value := &_MsgSetRoutingRules_1_list{list: &x.Rules} + return protoreflect.ValueOfList(value) + case "irita.tibc.MsgSetRoutingRules.signer": + panic(fmt.Errorf("field signer of message irita.tibc.MsgSetRoutingRules is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRules 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_MsgSetRoutingRules) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "irita.tibc.MsgSetRoutingRules.rules": + list := []string{} + return protoreflect.ValueOfList(&_MsgSetRoutingRules_1_list{list: &list}) + case "irita.tibc.MsgSetRoutingRules.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRules 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_MsgSetRoutingRules) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgSetRoutingRules", 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_MsgSetRoutingRules) 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_MsgSetRoutingRules) 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_MsgSetRoutingRules) 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_MsgSetRoutingRules) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetRoutingRules) + 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.Rules) > 0 { + for _, s := range x.Rules { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Signer) + 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().(*MsgSetRoutingRules) + 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.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x12 + } + if len(x.Rules) > 0 { + for iNdEx := len(x.Rules) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Rules[iNdEx]) + copy(dAtA[i:], x.Rules[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Rules[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().(*MsgSetRoutingRules) + 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: MsgSetRoutingRules: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetRoutingRules: 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 Rules", 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.Rules = append(x.Rules, 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 Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSetRoutingRulesResponse protoreflect.MessageDescriptor +) + +func init() { + file_irita_tibc_tx_proto_init() + md_MsgSetRoutingRulesResponse = File_irita_tibc_tx_proto.Messages().ByName("MsgSetRoutingRulesResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetRoutingRulesResponse)(nil) + +type fastReflection_MsgSetRoutingRulesResponse MsgSetRoutingRulesResponse + +func (x *MsgSetRoutingRulesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRulesResponse)(x) +} + +func (x *MsgSetRoutingRulesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_irita_tibc_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_MsgSetRoutingRulesResponse_messageType fastReflection_MsgSetRoutingRulesResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetRoutingRulesResponse_messageType{} + +type fastReflection_MsgSetRoutingRulesResponse_messageType struct{} + +func (x fastReflection_MsgSetRoutingRulesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRulesResponse)(nil) +} +func (x fastReflection_MsgSetRoutingRulesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRulesResponse) +} +func (x fastReflection_MsgSetRoutingRulesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRulesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetRoutingRulesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRulesResponse +} + +// 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_MsgSetRoutingRulesResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSetRoutingRulesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetRoutingRulesResponse) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRulesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetRoutingRulesResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSetRoutingRulesResponse)(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_MsgSetRoutingRulesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetRoutingRulesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRulesResponse 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_MsgSetRoutingRulesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRulesResponse 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_MsgSetRoutingRulesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRulesResponse 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_MsgSetRoutingRulesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRulesResponse 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_MsgSetRoutingRulesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRulesResponse 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_MsgSetRoutingRulesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: irita.tibc.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message irita.tibc.MsgSetRoutingRulesResponse 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_MsgSetRoutingRulesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in irita.tibc.MsgSetRoutingRulesResponse", 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_MsgSetRoutingRulesResponse) 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_MsgSetRoutingRulesResponse) 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_MsgSetRoutingRulesResponse) 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_MsgSetRoutingRulesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetRoutingRulesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetRoutingRulesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetRoutingRulesResponse) + 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: MsgSetRoutingRulesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetRoutingRulesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: irita/tibc/tx.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) +) + +// MsgMint defines a message to mint the base native token. +type MsgCreateClient struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainName string `protobuf:"bytes,1,opt,name=chainName,proto3" json:"chainName,omitempty"` + ClientState *anypb.Any `protobuf:"bytes,2,opt,name=clientState,proto3" json:"clientState,omitempty"` + ConsensusState *anypb.Any `protobuf:"bytes,3,opt,name=consensusState,proto3" json:"consensusState,omitempty"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgCreateClient) Reset() { + *x = MsgCreateClient{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateClient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateClient) ProtoMessage() {} + +// Deprecated: Use MsgCreateClient.ProtoReflect.Descriptor instead. +func (*MsgCreateClient) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgCreateClient) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *MsgCreateClient) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +func (x *MsgCreateClient) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +func (x *MsgCreateClient) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgMintResponse defines the Msg/Mint response type. +type MsgCreateClientResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCreateClientResponse) Reset() { + *x = MsgCreateClientResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateClientResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateClientResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateClientResponse) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgReclaim defines a message to reclaim the specified native token. +type MsgUpgradeClient struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainName string `protobuf:"bytes,1,opt,name=chainName,proto3" json:"chainName,omitempty"` + ClientState *anypb.Any `protobuf:"bytes,2,opt,name=clientState,proto3" json:"clientState,omitempty"` + ConsensusState *anypb.Any `protobuf:"bytes,3,opt,name=consensusState,proto3" json:"consensusState,omitempty"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgUpgradeClient) Reset() { + *x = MsgUpgradeClient{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpgradeClient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpgradeClient) ProtoMessage() {} + +// Deprecated: Use MsgUpgradeClient.ProtoReflect.Descriptor instead. +func (*MsgUpgradeClient) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgUpgradeClient) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *MsgUpgradeClient) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +func (x *MsgUpgradeClient) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +func (x *MsgUpgradeClient) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgReclaimResponse defines the Msg/Reclaim response type. +type MsgUpgradeClientResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpgradeClientResponse) Reset() { + *x = MsgUpgradeClientResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpgradeClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpgradeClientResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpgradeClientResponse.ProtoReflect.Descriptor instead. +func (*MsgUpgradeClientResponse) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{3} +} + +type MsgRegisterRelayer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + Relayers []string `protobuf:"bytes,2,rep,name=relayers,proto3" json:"relayers,omitempty"` + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgRegisterRelayer) Reset() { + *x = MsgRegisterRelayer{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterRelayer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterRelayer) ProtoMessage() {} + +// Deprecated: Use MsgRegisterRelayer.ProtoReflect.Descriptor instead. +func (*MsgRegisterRelayer) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgRegisterRelayer) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *MsgRegisterRelayer) GetRelayers() []string { + if x != nil { + return x.Relayers + } + return nil +} + +func (x *MsgRegisterRelayer) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +type MsgRegisterRelayerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRegisterRelayerResponse) Reset() { + *x = MsgRegisterRelayerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterRelayerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterRelayerResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterRelayerResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterRelayerResponse) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{5} +} + +type MsgSetRoutingRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rules []string `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgSetRoutingRules) Reset() { + *x = MsgSetRoutingRules{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetRoutingRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetRoutingRules) ProtoMessage() {} + +// Deprecated: Use MsgSetRoutingRules.ProtoReflect.Descriptor instead. +func (*MsgSetRoutingRules) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgSetRoutingRules) GetRules() []string { + if x != nil { + return x.Rules + } + return nil +} + +func (x *MsgSetRoutingRules) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +type MsgSetRoutingRulesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSetRoutingRulesResponse) Reset() { + *x = MsgSetRoutingRulesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_irita_tibc_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetRoutingRulesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetRoutingRulesResponse) ProtoMessage() {} + +// Deprecated: Use MsgSetRoutingRulesResponse.ProtoReflect.Descriptor instead. +func (*MsgSetRoutingRulesResponse) Descriptor() ([]byte, []int) { + return file_irita_tibc_tx_proto_rawDescGZIP(), []int{7} +} + +var File_irita_tibc_tx_proto protoreflect.FileDescriptor + +var file_irita_tibc_tx_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x74, 0x78, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x3c, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0e, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0f, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, + 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x3a, 0x0f, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x78, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0f, 0x88, 0xa0, 0x1f, 0x00, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x0f, 0x88, 0xa0, + 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x1c, 0x0a, + 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe2, 0x02, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 0x12, 0x50, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x1a, 0x23, 0x2e, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x24, 0x2e, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1e, 0x2e, + 0x69, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0x26, 0x2e, + 0x69, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x69, 0x72, 0x69, 0x74, 0x61, + 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x26, 0x2e, 0x69, 0x72, 0x69, 0x74, 0x61, + 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x83, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x72, 0x69, + 0x74, 0x61, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x72, 0x69, 0x74, 0x61, 0x2f, 0x74, 0x69, 0x62, 0x63, 0xa2, + 0x02, 0x03, 0x49, 0x54, 0x58, 0xaa, 0x02, 0x0a, 0x49, 0x72, 0x69, 0x74, 0x61, 0x2e, 0x54, 0x69, + 0x62, 0x63, 0xca, 0x02, 0x0a, 0x49, 0x72, 0x69, 0x74, 0x61, 0x5c, 0x54, 0x69, 0x62, 0x63, 0xe2, + 0x02, 0x16, 0x49, 0x72, 0x69, 0x74, 0x61, 0x5c, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x49, 0x72, 0x69, 0x74, 0x61, + 0x3a, 0x3a, 0x54, 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_irita_tibc_tx_proto_rawDescOnce sync.Once + file_irita_tibc_tx_proto_rawDescData = file_irita_tibc_tx_proto_rawDesc +) + +func file_irita_tibc_tx_proto_rawDescGZIP() []byte { + file_irita_tibc_tx_proto_rawDescOnce.Do(func() { + file_irita_tibc_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_irita_tibc_tx_proto_rawDescData) + }) + return file_irita_tibc_tx_proto_rawDescData +} + +var file_irita_tibc_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_irita_tibc_tx_proto_goTypes = []interface{}{ + (*MsgCreateClient)(nil), // 0: irita.tibc.MsgCreateClient + (*MsgCreateClientResponse)(nil), // 1: irita.tibc.MsgCreateClientResponse + (*MsgUpgradeClient)(nil), // 2: irita.tibc.MsgUpgradeClient + (*MsgUpgradeClientResponse)(nil), // 3: irita.tibc.MsgUpgradeClientResponse + (*MsgRegisterRelayer)(nil), // 4: irita.tibc.MsgRegisterRelayer + (*MsgRegisterRelayerResponse)(nil), // 5: irita.tibc.MsgRegisterRelayerResponse + (*MsgSetRoutingRules)(nil), // 6: irita.tibc.MsgSetRoutingRules + (*MsgSetRoutingRulesResponse)(nil), // 7: irita.tibc.MsgSetRoutingRulesResponse + (*anypb.Any)(nil), // 8: google.protobuf.Any +} +var file_irita_tibc_tx_proto_depIdxs = []int32{ + 8, // 0: irita.tibc.MsgCreateClient.clientState:type_name -> google.protobuf.Any + 8, // 1: irita.tibc.MsgCreateClient.consensusState:type_name -> google.protobuf.Any + 8, // 2: irita.tibc.MsgUpgradeClient.clientState:type_name -> google.protobuf.Any + 8, // 3: irita.tibc.MsgUpgradeClient.consensusState:type_name -> google.protobuf.Any + 0, // 4: irita.tibc.Msg.CreateClient:input_type -> irita.tibc.MsgCreateClient + 2, // 5: irita.tibc.Msg.UpgradeClient:input_type -> irita.tibc.MsgUpgradeClient + 4, // 6: irita.tibc.Msg.RegisterRelayer:input_type -> irita.tibc.MsgRegisterRelayer + 6, // 7: irita.tibc.Msg.SetRoutingRules:input_type -> irita.tibc.MsgSetRoutingRules + 1, // 8: irita.tibc.Msg.CreateClient:output_type -> irita.tibc.MsgCreateClientResponse + 3, // 9: irita.tibc.Msg.UpgradeClient:output_type -> irita.tibc.MsgUpgradeClientResponse + 5, // 10: irita.tibc.Msg.RegisterRelayer:output_type -> irita.tibc.MsgRegisterRelayerResponse + 7, // 11: irita.tibc.Msg.SetRoutingRules:output_type -> irita.tibc.MsgSetRoutingRulesResponse + 8, // [8:12] is the sub-list for method output_type + 4, // [4:8] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_irita_tibc_tx_proto_init() } +func file_irita_tibc_tx_proto_init() { + if File_irita_tibc_tx_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_irita_tibc_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateClient); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irita_tibc_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateClientResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irita_tibc_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpgradeClient); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irita_tibc_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpgradeClientResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irita_tibc_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterRelayer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irita_tibc_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterRelayerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irita_tibc_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetRoutingRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_irita_tibc_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetRoutingRulesResponse); 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_irita_tibc_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_irita_tibc_tx_proto_goTypes, + DependencyIndexes: file_irita_tibc_tx_proto_depIdxs, + MessageInfos: file_irita_tibc_tx_proto_msgTypes, + }.Build() + File_irita_tibc_tx_proto = out.File + file_irita_tibc_tx_proto_rawDesc = nil + file_irita_tibc_tx_proto_goTypes = nil + file_irita_tibc_tx_proto_depIdxs = nil +} diff --git a/api/irita/tibc/tx_grpc.pb.go b/api/irita/tibc/tx_grpc.pb.go new file mode 100644 index 0000000..7db2aea --- /dev/null +++ b/api/irita/tibc/tx_grpc.pb.go @@ -0,0 +1,228 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: irita/tibc/tx.proto + +package tibc + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Msg_CreateClient_FullMethodName = "/irita.tibc.Msg/CreateClient" + Msg_UpgradeClient_FullMethodName = "/irita.tibc.Msg/UpgradeClient" + Msg_RegisterRelayer_FullMethodName = "/irita.tibc.Msg/RegisterRelayer" + Msg_SetRoutingRules_FullMethodName = "/irita.tibc.Msg/SetRoutingRules" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Msg defines the OPB Msg service. +type MsgClient interface { + CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) + UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) + RegisterRelayer(ctx context.Context, in *MsgRegisterRelayer, opts ...grpc.CallOption) (*MsgRegisterRelayerResponse, error) + SetRoutingRules(ctx context.Context, in *MsgSetRoutingRules, opts ...grpc.CallOption) (*MsgSetRoutingRulesResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCreateClientResponse) + err := c.cc.Invoke(ctx, Msg_CreateClient_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpgradeClientResponse) + err := c.cc.Invoke(ctx, Msg_UpgradeClient_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterRelayer(ctx context.Context, in *MsgRegisterRelayer, opts ...grpc.CallOption) (*MsgRegisterRelayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgRegisterRelayerResponse) + err := c.cc.Invoke(ctx, Msg_RegisterRelayer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SetRoutingRules(ctx context.Context, in *MsgSetRoutingRules, opts ...grpc.CallOption) (*MsgSetRoutingRulesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgSetRoutingRulesResponse) + err := c.cc.Invoke(ctx, Msg_SetRoutingRules_FullMethodName, in, out, cOpts...) + 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 +// +// Msg defines the OPB Msg service. +type MsgServer interface { + CreateClient(context.Context, *MsgCreateClient) (*MsgCreateClientResponse, error) + UpgradeClient(context.Context, *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) + RegisterRelayer(context.Context, *MsgRegisterRelayer) (*MsgRegisterRelayerResponse, error) + SetRoutingRules(context.Context, *MsgSetRoutingRules) (*MsgSetRoutingRulesResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) CreateClient(context.Context, *MsgCreateClient) (*MsgCreateClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateClient not implemented") +} +func (UnimplementedMsgServer) UpgradeClient(context.Context, *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpgradeClient not implemented") +} +func (UnimplementedMsgServer) RegisterRelayer(context.Context, *MsgRegisterRelayer) (*MsgRegisterRelayerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterRelayer not implemented") +} +func (UnimplementedMsgServer) SetRoutingRules(context.Context, *MsgSetRoutingRules) (*MsgSetRoutingRulesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetRoutingRules not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_CreateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateClient_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateClient(ctx, req.(*MsgCreateClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpgradeClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpgradeClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpgradeClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpgradeClient_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpgradeClient(ctx, req.(*MsgUpgradeClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RegisterRelayer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterRelayer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterRelayer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RegisterRelayer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterRelayer(ctx, req.(*MsgRegisterRelayer)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SetRoutingRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetRoutingRules) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetRoutingRules(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SetRoutingRules_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetRoutingRules(ctx, req.(*MsgSetRoutingRules)) + } + 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) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "irita.tibc.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateClient", + Handler: _Msg_CreateClient_Handler, + }, + { + MethodName: "UpgradeClient", + Handler: _Msg_UpgradeClient_Handler, + }, + { + MethodName: "RegisterRelayer", + Handler: _Msg_RegisterRelayer_Handler, + }, + { + MethodName: "SetRoutingRules", + Handler: _Msg_SetRoutingRules_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "irita/tibc/tx.proto", +} diff --git a/app/app_config.go b/app/app_config.go index cf29b65..0af03e3 100644 --- a/app/app_config.go +++ b/app/app_config.go @@ -6,18 +6,26 @@ import ( authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" consensusmodulev1 "cosmossdk.io/api/cosmos/consensus/module/v1" + crisismodulev1 "cosmossdk.io/api/cosmos/crisis/module/v1" evidencemodulev1 "cosmossdk.io/api/cosmos/evidence/module/v1" feegrantmodulev1 "cosmossdk.io/api/cosmos/feegrant/module/v1" txconfigv1 "cosmossdk.io/api/cosmos/tx/config/v1" "cosmossdk.io/core/appconfig" + + tibmodulev1 "github.com/bianjieai/irita/api/irita/tibc/module/v1" + _ "github.com/bianjieai/irita/modules/tibc" // import for side-effects + tibctypes "github.com/bianjieai/irita/modules/tibc/types" // import for side-effects + tibcmtmodulev1 "github.com/bianjieai/tibc-go/api/tibc/apps/mt_transfer/module/v1" + tibcnftmodulev1 "github.com/bianjieai/tibc-go/api/tibc/apps/nft_transfer/module/v1" _ "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer" // import for side-effects tibcmttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types" + _ "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer" // import for side-effects tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" - tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" "github.com/cosmos/cosmos-sdk/x/feegrant" "github.com/cosmos/cosmos-sdk/x/group" @@ -78,6 +86,7 @@ var ( banktypes.ModuleName, nodetypes.ModuleName, slashingtypes.ModuleName, + crisistypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, feegrant.ModuleName, @@ -92,7 +101,7 @@ var ( recordtypes.ModuleName, identitytypes.ModuleName, tokentypes.ModuleName, - tibchost.ModuleName, + tibctypes.ModuleName, tibcnfttypes.ModuleName, tibcmttypes.ModuleName, evmtypes.ModuleName, @@ -108,7 +117,9 @@ var ( {Account: servicetypes.RequestAccName}, {Account: servicetypes.FeeCollectorName, Permissions: []string{authtypes.Burner}}, {Account: tokentypes.ModuleName, Permissions: []string{authtypes.Minter, authtypes.Burner}}, - {Account: evmtypes.ModuleName, Permissions: []string{authtypes.Minter, authtypes.Burner}}, // used for secure addition and subtraction of balance using module account + {Account: evmtypes.ModuleName, Permissions: []string{authtypes.Minter, authtypes.Burner}}, + {Account: tibcnfttypes.ModuleName}, + {Account: tibcmttypes.ModuleName}, } // blocked account addresses @@ -143,6 +154,7 @@ var ( nodetypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, + crisistypes.ModuleName, genutiltypes.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, @@ -157,8 +169,12 @@ var ( consensustypes.ModuleName, evmtypes.ModuleName, feemarkettypes.ModuleName, + tibctypes.ModuleName, + tibcnfttypes.ModuleName, + tibcmttypes.ModuleName, }, EndBlockers: []string{ + crisistypes.ModuleName, nodetypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, @@ -181,6 +197,9 @@ var ( tokentypes.ModuleName, evmtypes.ModuleName, feemarkettypes.ModuleName, + tibctypes.ModuleName, + tibcnfttypes.ModuleName, + tibcmttypes.ModuleName, }, OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { @@ -241,6 +260,10 @@ var ( Name: feegrant.ModuleName, Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), }, + { + Name: crisistypes.ModuleName, + Config: appconfig.WrapAny(&crisismodulev1.Module{}), + }, { Name: consensustypes.ModuleName, Config: appconfig.WrapAny(&consensusmodulev1.Module{}), @@ -291,6 +314,18 @@ var ( Name: feemarkettypes.ModuleName, Config: appconfig.WrapAny(&feemarketmodulev1.Module{}), }, + { + Name: tibctypes.ModuleName, + Config: appconfig.WrapAny(&tibmodulev1.Module{}), + }, + { + Name: tibcnfttypes.ModuleName, + Config: appconfig.WrapAny(&tibcnftmodulev1.Module{}), + }, + { + Name: tibcmttypes.ModuleName, + Config: appconfig.WrapAny(&tibcmtmodulev1.Module{}), + }, }, }) ) diff --git a/app/app_v2.go b/app/app_v2.go index 15c6098..d96eada 100644 --- a/app/app_v2.go +++ b/app/app_v2.go @@ -22,16 +22,19 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" cosmosparamstypes "github.com/cosmos/cosmos-sdk/x/params/types" evmkeeper "github.com/evmos/ethermint/x/evm/keeper" feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" + identitykeeper "iritamod.bianjie.ai/modules/identity/keeper" nodekeeper "iritamod.bianjie.ai/modules/node/keeper" paramskeeper "iritamod.bianjie.ai/modules/params/keeper" slashingkeeper "iritamod.bianjie.ai/modules/slashing/keeper" upgradekeeper "iritamod.bianjie.ai/modules/upgrade/keeper" + mtkeeper "mods.irisnet.org/modules/mt/keeper" nftkeeper "mods.irisnet.org/modules/nft/keeper" oraclekeeper "mods.irisnet.org/modules/oracle/keeper" @@ -40,6 +43,10 @@ import ( servicekeeper "mods.irisnet.org/modules/service/keeper" tokenkeeper "mods.irisnet.org/modules/token/keeper" + tibckeeper "github.com/bianjieai/irita/modules/tibc/keeper" + tibcmttransferkeeper "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/keeper" + tibcnfttransferkeeper "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/keeper" + "github.com/bianjieai/irita/crypto/hd" "github.com/bianjieai/irita/wrapper" ) @@ -57,25 +64,29 @@ type IritaAppV2 struct { interfaceRegistry codectypes.InterfaceRegistry // keepers - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - UpgradeKeeper *upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - RecordKeeper recordkeeper.Keeper - TokenKeeper tokenkeeper.Keeper - NftKeeper nftkeeper.Keeper - MtKeeper mtkeeper.Keeper - ServiceKeeper servicekeeper.Keeper - OracleKeeper oraclekeeper.Keeper - RandomKeeper randomkeeper.Keeper - IdentityKeeper identitykeeper.Keeper - NodeKeeper *nodekeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - ConsensusParamsKeeper consensuskeeper.Keeper - EvmKeeper *evmkeeper.Keeper - FeeMarketKeeper feemarketkeeper.Keeper + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + CrisisKeeper *crisiskeeper.Keeper + UpgradeKeeper *upgradekeeper.Keeper + ParamsKeeper paramskeeper.Keeper + EvidenceKeeper evidencekeeper.Keeper + RecordKeeper recordkeeper.Keeper + TokenKeeper tokenkeeper.Keeper + NftKeeper nftkeeper.Keeper + MtKeeper mtkeeper.Keeper + ServiceKeeper servicekeeper.Keeper + OracleKeeper oraclekeeper.Keeper + RandomKeeper randomkeeper.Keeper + IdentityKeeper identitykeeper.Keeper + NodeKeeper *nodekeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper + ConsensusKeeper consensuskeeper.Keeper + EvmKeeper *evmkeeper.Keeper + FeeMarketKeeper feemarketkeeper.Keeper + TibcKeeper *tibckeeper.Keeper + NftTransferKeeper tibcnfttransferkeeper.Keeper + MtTransferKeeper tibcmttransferkeeper.Keeper // simulation manager sm *module.SimulationManager @@ -121,6 +132,7 @@ func NewIritaAppV2( wrapper.ProvideICS20Keeper, wrapper.ProvideEvmConstructor, wrapper.ProvideStakingHooks, + wrapper.ProvideTibcNftKeeper, ), depinject.Supply( providers..., @@ -161,6 +173,7 @@ func NewIritaAppV2( &app.interfaceRegistry, &app.AccountKeeper, &app.BankKeeper, + &app.CrisisKeeper, &app.NodeKeeper, &app.SlashingKeeper, &app.UpgradeKeeper, @@ -175,9 +188,12 @@ func NewIritaAppV2( &app.OracleKeeper, &app.RandomKeeper, &app.IdentityKeeper, - &app.ConsensusParamsKeeper, + &app.ConsensusKeeper, &app.EvmKeeper, &app.FeeMarketKeeper, + &app.TibcKeeper, + &app.NftTransferKeeper, + &app.MtTransferKeeper, ) if err := depinject.Inject(appConfig, consumer...); err != nil { diff --git a/go.mod b/go.mod index 8e00eb2..5a2a1e5 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ replace ( require ( cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d cosmossdk.io/tools/rosetta v0.2.1 - github.com/bianjieai/tibc-go v0.5.1-0.20240710015305-5ebf9ca08920 + github.com/bianjieai/tibc-go v0.5.1-0.20240726020438-210099137d0b github.com/cosmos/cosmos-sdk v0.47.12 iritamod.bianjie.ai/api v0.0.0-20240725020316-2fe96dcb32a4 iritamod.bianjie.ai/modules/genutil v0.0.0-20240725020316-2fe96dcb32a4 @@ -55,7 +55,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 golang.org/x/crypto v0.22.0 + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa google.golang.org/grpc v1.62.1 + google.golang.org/protobuf v1.33.0 mods.irisnet.org/api v0.0.0-20240628054110-4cb043e0238a ) @@ -234,7 +236,6 @@ require ( go.opentelemetry.io/otel/trace v1.21.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.9.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/net v0.24.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect @@ -248,7 +249,6 @@ require ( google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 51754ba..b912817 100644 --- a/go.sum +++ b/go.sum @@ -292,8 +292,8 @@ github.com/bianjieai/cosmos-sdk v0.47.12-irita-20240701 h1:P01Cf16brUHKfRCkTlyn1 github.com/bianjieai/cosmos-sdk v0.47.12-irita-20240701/go.mod h1:Gd3PnQWerNtAZEJT6FbdOfxILK68AT8L9zZSRb9WMok= github.com/bianjieai/ethermint v0.22.0-irishub-20240512.0.20240723100932-1e8e8edcb552 h1:cXV2906eVv5iii2ekRNwyplRwDYg8c57SJU8BPi2HSc= github.com/bianjieai/ethermint v0.22.0-irishub-20240512.0.20240723100932-1e8e8edcb552/go.mod h1:04OAz7IUzWNLtDLJWiGQMPLwmdQ1XjlWJUb/993+QHo= -github.com/bianjieai/tibc-go v0.5.1-0.20240710015305-5ebf9ca08920 h1:HGL+3poZobbtkjwAP0JwtlUxD4QUtyQlzXqZ/zbDLKE= -github.com/bianjieai/tibc-go v0.5.1-0.20240710015305-5ebf9ca08920/go.mod h1:pAl6C6Fu4Rq4eWLkkMELMvPE8gJplv2ksvbYr6mPmt4= +github.com/bianjieai/tibc-go v0.5.1-0.20240726020438-210099137d0b h1:5YBOTS70NYnPrtdX6CVTj0GMDoLurTVbTjLnxzje8mU= +github.com/bianjieai/tibc-go v0.5.1-0.20240726020438-210099137d0b/go.mod h1:pAl6C6Fu4Rq4eWLkkMELMvPE8gJplv2ksvbYr6mPmt4= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= diff --git a/modules/tibc/depinject.go b/modules/tibc/depinject.go new file mode 100644 index 0000000..211c928 --- /dev/null +++ b/modules/tibc/depinject.go @@ -0,0 +1,106 @@ +package tibc + +import ( + "cosmossdk.io/core/appmodule" + "cosmossdk.io/depinject" + "golang.org/x/exp/maps" + "golang.org/x/exp/slices" + + "github.com/cosmos/cosmos-sdk/codec" + store "github.com/cosmos/cosmos-sdk/store/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + clientkeeper "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/keeper" + clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" + packetkeeper "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/keeper" + routingkeeper "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/keeper" + tibcroutingtypes "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types" + "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" + + tibmodulev1 "github.com/bianjieai/irita/api/irita/tibc/module/v1" + tibckeeper "github.com/bianjieai/irita/modules/tibc/keeper" +) + +// App Wiring Setup +func init() { + appmodule.Register(&tibmodulev1.Module{}, + appmodule.Provide(ProvideModule), + appmodule.Invoke(InvokeTibcRouter), + ) +} + +var _ appmodule.AppModule = AppModule{} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// Inputs define the module inputs for the depinject. +type Inputs struct { + depinject.In + + Config *tibmodulev1.Module + Cdc codec.Codec + Key *store.KVStoreKey + + StakingKeeper clienttypes.StakingKeeper +} + +// Outputs define the module outputs for the depinject. +type Outputs struct { + depinject.Out + + TibcKeeper *tibckeeper.Keeper + ClientKeeper clientkeeper.Keeper + PacketKeeper packetkeeper.Keeper + RoutingKeeper routingkeeper.Keeper + Module appmodule.AppModule +} + +// ProvideModule defines a function that provides the TIBC module with necessary inputs and returns the outputs. +// +// Inputs: Inputs struct containing configuration, codec, store key, and staking keeper. +// Outputs: Outputs struct with TIBC keeper, module, client keeper, packet keeper, and routing keeper. +func ProvideModule(in Inputs) Outputs { + // default to governance authority if not provided + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + + coreKeeper := keeper.NewKeeper( + in.Cdc, + in.Key, + in.StakingKeeper, + authority.String(), + ) + + keeper := tibckeeper.NewKeeper(coreKeeper) + m := NewAppModule(keeper) + return Outputs{ + TibcKeeper: keeper, + ClientKeeper: keeper.ClientKeeper, + PacketKeeper: keeper.PacketKeeper, + RoutingKeeper: keeper.RoutingKeeper, + Module: m, + } +} + +// InvokeTibcRouter invokes the TIBC router with the TIBC modules. +func InvokeTibcRouter(tibcKeeper *tibckeeper.Keeper, tibcModules map[string]tibcroutingtypes.TIBCModule) { + if tibcModules == nil || len(tibcModules) == 0 { + return + } + + modules := maps.Keys(tibcModules) + slices.Sort(modules) + + tibcRouter := tibcroutingtypes.NewRouter() + for _, moduleName := range modules { + tibcRouter.AddRoute(tibcroutingtypes.Port(moduleName), tibcModules[moduleName]) + } + tibcKeeper.SetRouter(tibcRouter) +} diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml new file mode 100644 index 0000000..8516754 --- /dev/null +++ b/proto/buf.gen.pulsar.yaml @@ -0,0 +1,19 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: cosmossdk.io/api + except: + - buf.build/googleapis/googleapis + - buf.build/cosmos/gogo-proto + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/ics23 + override: + buf.build/bianjieai/irita: github.com/bianjieai/irita/api +plugins: + - name: go-pulsar + out: ../api + opt: paths=source_relative + - name: go-grpc + out: ../api + opt: paths=source_relative \ No newline at end of file diff --git a/proto/irita/tibc/module/v1/module.proto b/proto/irita/tibc/module/v1/module.proto new file mode 100644 index 0000000..771530a --- /dev/null +++ b/proto/irita/tibc/module/v1/module.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package tibc.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object of the tibc module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import : "github.com/bianjieai/irita/modules/tibc" + }; + + // authority defines the custom module authority. If not set, defaults to the + // governance module. + string authority = 1; +} \ No newline at end of file diff --git a/scripts/protocgen-pulsar.sh b/scripts/protocgen-pulsar.sh new file mode 100755 index 0000000..0fc9ece --- /dev/null +++ b/scripts/protocgen-pulsar.sh @@ -0,0 +1,16 @@ +# this script is for generating protobuf files for the new google.golang.org/protobuf API + +set -eo pipefail + +protoc_install_gopulsar() { + go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest +} + +protoc_install_gopulsar + +echo "Cleaning API directory" +(cd api; find ./ -type f \( -iname \*.pulsar.go -o -iname \*.pb.go -o -iname \*.cosmos_orm.go -o -iname \*.pb.gw.go \) -delete; find . -empty -type d -delete; cd ..) + +echo "Generating API module" +(cd proto; buf generate --template buf.gen.pulsar.yaml) \ No newline at end of file diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 1816bbf..df6c668 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -36,3 +36,5 @@ cd .. # move proto files to the right places cp -r github.com/bianjieai/irita/* ./ rm -rf github.com + +./scripts/protocgen-pulsar.sh diff --git a/wrapper/provider.go b/wrapper/provider.go new file mode 100644 index 0000000..9f62ba4 --- /dev/null +++ b/wrapper/provider.go @@ -0,0 +1,37 @@ +package wrapper + +import ( + nfttransfertypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" + evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" + nodekeeper "iritamod.bianjie.ai/modules/node/keeper" + slashingkeeper "iritamod.bianjie.ai/modules/slashing/keeper" + nftkeeper "mods.irisnet.org/modules/nft/keeper" +) + +// ProvideSlashingStakingKeeper provides a slashing staking keeper +func ProvideSlashingStakingKeeper(nodeKeeper *nodekeeper.Keeper) slashingtypes.StakingKeeper { + return NewStakingKeeper(nodeKeeper) +} + +// ProvideEvidenceStakingKeeper provides a evidence staking keeper +func ProvideEvidenceStakingKeeper(nodeKeeper *nodekeeper.Keeper) evidencetypes.StakingKeeper { + return NewStakingKeeper(nodeKeeper) +} + +// ProvideEvmStakingKeeper provides a evm staking keeper +func ProvideEvmStakingKeeper(nodeKeeper *nodekeeper.Keeper) evmtypes.StakingKeeper { + return NewStakingKeeper(nodeKeeper) +} + +// ProvideStakingHooks provides a staking hooks +func ProvideStakingHooks(slashingKeeper slashingkeeper.Keeper) []stakingtypes.StakingHooks { + return []stakingtypes.StakingHooks{slashingKeeper.Hooks()} +} + +// ProvideTibcNftKeeper provides a tibc nft keeper +func ProvideTibcNftKeeper(k nftkeeper.Keeper) nfttransfertypes.NftKeeper { + return nftkeeper.NewLegacyKeeper(k) +} \ No newline at end of file diff --git a/wrapper/staking.go b/wrapper/staking.go index d8acad5..fc9bfbd 100644 --- a/wrapper/staking.go +++ b/wrapper/staking.go @@ -8,10 +8,8 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" evmtypes "github.com/evmos/ethermint/x/evm/types" nodekeeper "iritamod.bianjie.ai/modules/node/keeper" - slashingkeeper "iritamod.bianjie.ai/modules/slashing/keeper" ) var ( @@ -20,28 +18,13 @@ var ( _ evmtypes.StakingKeeper = (*StakingKeeper)(nil) ) +// StakingKeeperI is an interface that is implemented by the staking keeper struct. type StakingKeeperI interface { slashingtypes.StakingKeeper evidencetypes.StakingKeeper evmtypes.StakingKeeper } -func ProvideSlashingStakingKeeper(nodeKeeper *nodekeeper.Keeper) slashingtypes.StakingKeeper { - return NewStakingKeeper(nodeKeeper) -} - -func ProvideEvidenceStakingKeeper(nodeKeeper *nodekeeper.Keeper) evidencetypes.StakingKeeper { - return NewStakingKeeper(nodeKeeper) -} - -func ProvideEvmStakingKeeper(nodeKeeper *nodekeeper.Keeper) evmtypes.StakingKeeper { - return NewStakingKeeper(nodeKeeper) -} - -func ProvideStakingHooks(slashingKeeper slashingkeeper.Keeper) []stakingtypes.StakingHooks { - return []stakingtypes.StakingHooks{slashingKeeper.Hooks()} -} - // StakingKeeper implements the staking keeper interface. type StakingKeeper struct { nk *nodekeeper.Keeper