diff --git a/api/cosmos/evm/ibc/clients/v1/query.pulsar.go b/api/cosmos/evm/ibc/clients/v1/query.pulsar.go new file mode 100644 index 000000000..eaa473bcd --- /dev/null +++ b/api/cosmos/evm/ibc/clients/v1/query.pulsar.go @@ -0,0 +1,3164 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package clientsv1 + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + _ "cosmossdk.io/api/cosmos/query/v1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + 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_QueryClientPrecompileRequest protoreflect.MessageDescriptor + fd_QueryClientPrecompileRequest_client protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_query_proto_init() + md_QueryClientPrecompileRequest = File_cosmos_evm_ibc_clients_v1_query_proto.Messages().ByName("QueryClientPrecompileRequest") + fd_QueryClientPrecompileRequest_client = md_QueryClientPrecompileRequest.Fields().ByName("client") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientPrecompileRequest)(nil) + +type fastReflection_QueryClientPrecompileRequest QueryClientPrecompileRequest + +func (x *QueryClientPrecompileRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientPrecompileRequest)(x) +} + +func (x *QueryClientPrecompileRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_query_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_QueryClientPrecompileRequest_messageType fastReflection_QueryClientPrecompileRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientPrecompileRequest_messageType{} + +type fastReflection_QueryClientPrecompileRequest_messageType struct{} + +func (x fastReflection_QueryClientPrecompileRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientPrecompileRequest)(nil) +} +func (x fastReflection_QueryClientPrecompileRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompileRequest) +} +func (x fastReflection_QueryClientPrecompileRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompileRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientPrecompileRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompileRequest +} + +// 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_QueryClientPrecompileRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryClientPrecompileRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientPrecompileRequest) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompileRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientPrecompileRequest) Interface() protoreflect.ProtoMessage { + return (*QueryClientPrecompileRequest)(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_QueryClientPrecompileRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Client != "" { + value := protoreflect.ValueOfString(x.Client) + if !f(fd_QueryClientPrecompileRequest_client, 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_QueryClientPrecompileRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest.client": + return x.Client != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest 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_QueryClientPrecompileRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest.client": + x.Client = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest 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_QueryClientPrecompileRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest.client": + value := x.Client + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest 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_QueryClientPrecompileRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest.client": + x.Client = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest 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_QueryClientPrecompileRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest.client": + panic(fmt.Errorf("field client of message cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest 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_QueryClientPrecompileRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest.client": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest 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_QueryClientPrecompileRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest", 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_QueryClientPrecompileRequest) 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_QueryClientPrecompileRequest) 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_QueryClientPrecompileRequest) 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_QueryClientPrecompileRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientPrecompileRequest) + 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.Client) + 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().(*QueryClientPrecompileRequest) + 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.Client) > 0 { + i -= len(x.Client) + copy(dAtA[i:], x.Client) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Client))) + 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().(*QueryClientPrecompileRequest) + 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: QueryClientPrecompileRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientPrecompileRequest: 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 Client", 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.Client = 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_QueryClientPrecompileResponse protoreflect.MessageDescriptor + fd_QueryClientPrecompileResponse_precompile protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_query_proto_init() + md_QueryClientPrecompileResponse = File_cosmos_evm_ibc_clients_v1_query_proto.Messages().ByName("QueryClientPrecompileResponse") + fd_QueryClientPrecompileResponse_precompile = md_QueryClientPrecompileResponse.Fields().ByName("precompile") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientPrecompileResponse)(nil) + +type fastReflection_QueryClientPrecompileResponse QueryClientPrecompileResponse + +func (x *QueryClientPrecompileResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientPrecompileResponse)(x) +} + +func (x *QueryClientPrecompileResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_query_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_QueryClientPrecompileResponse_messageType fastReflection_QueryClientPrecompileResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientPrecompileResponse_messageType{} + +type fastReflection_QueryClientPrecompileResponse_messageType struct{} + +func (x fastReflection_QueryClientPrecompileResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientPrecompileResponse)(nil) +} +func (x fastReflection_QueryClientPrecompileResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompileResponse) +} +func (x fastReflection_QueryClientPrecompileResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompileResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientPrecompileResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompileResponse +} + +// 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_QueryClientPrecompileResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryClientPrecompileResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientPrecompileResponse) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompileResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientPrecompileResponse) Interface() protoreflect.ProtoMessage { + return (*QueryClientPrecompileResponse)(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_QueryClientPrecompileResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Precompile != nil { + value := protoreflect.ValueOfMessage(x.Precompile.ProtoReflect()) + if !f(fd_QueryClientPrecompileResponse_precompile, 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_QueryClientPrecompileResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse.precompile": + return x.Precompile != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse 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_QueryClientPrecompileResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse.precompile": + x.Precompile = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse 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_QueryClientPrecompileResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse.precompile": + value := x.Precompile + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse 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_QueryClientPrecompileResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse.precompile": + x.Precompile = value.Message().Interface().(*ClientPrecompile) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse 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_QueryClientPrecompileResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse.precompile": + if x.Precompile == nil { + x.Precompile = new(ClientPrecompile) + } + return protoreflect.ValueOfMessage(x.Precompile.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse 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_QueryClientPrecompileResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse.precompile": + m := new(ClientPrecompile) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse 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_QueryClientPrecompileResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse", 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_QueryClientPrecompileResponse) 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_QueryClientPrecompileResponse) 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_QueryClientPrecompileResponse) 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_QueryClientPrecompileResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientPrecompileResponse) + 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.Precompile != nil { + l = options.Size(x.Precompile) + 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().(*QueryClientPrecompileResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Precompile != nil { + encoded, err := options.Marshal(x.Precompile) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryClientPrecompileResponse) + 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: QueryClientPrecompileResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientPrecompileResponse: 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 Precompile", 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.Precompile == nil { + x.Precompile = &ClientPrecompile{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Precompile); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryClientPrecompilesRequest protoreflect.MessageDescriptor + fd_QueryClientPrecompilesRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_query_proto_init() + md_QueryClientPrecompilesRequest = File_cosmos_evm_ibc_clients_v1_query_proto.Messages().ByName("QueryClientPrecompilesRequest") + fd_QueryClientPrecompilesRequest_pagination = md_QueryClientPrecompilesRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientPrecompilesRequest)(nil) + +type fastReflection_QueryClientPrecompilesRequest QueryClientPrecompilesRequest + +func (x *QueryClientPrecompilesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientPrecompilesRequest)(x) +} + +func (x *QueryClientPrecompilesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_query_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_QueryClientPrecompilesRequest_messageType fastReflection_QueryClientPrecompilesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientPrecompilesRequest_messageType{} + +type fastReflection_QueryClientPrecompilesRequest_messageType struct{} + +func (x fastReflection_QueryClientPrecompilesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientPrecompilesRequest)(nil) +} +func (x fastReflection_QueryClientPrecompilesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompilesRequest) +} +func (x fastReflection_QueryClientPrecompilesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompilesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientPrecompilesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompilesRequest +} + +// 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_QueryClientPrecompilesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryClientPrecompilesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientPrecompilesRequest) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompilesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientPrecompilesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryClientPrecompilesRequest)(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_QueryClientPrecompilesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryClientPrecompilesRequest_pagination, 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_QueryClientPrecompilesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest 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_QueryClientPrecompilesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest 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_QueryClientPrecompilesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest 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_QueryClientPrecompilesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest 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_QueryClientPrecompilesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest 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_QueryClientPrecompilesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest 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_QueryClientPrecompilesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest", 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_QueryClientPrecompilesRequest) 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_QueryClientPrecompilesRequest) 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_QueryClientPrecompilesRequest) 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_QueryClientPrecompilesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientPrecompilesRequest) + 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.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryClientPrecompilesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryClientPrecompilesRequest) + 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: QueryClientPrecompilesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientPrecompilesRequest: 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryClientPrecompilesResponse_1_list)(nil) + +type _QueryClientPrecompilesResponse_1_list struct { + list *[]*ClientPrecompile +} + +func (x *_QueryClientPrecompilesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryClientPrecompilesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryClientPrecompilesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ClientPrecompile) + (*x.list)[i] = concreteValue +} + +func (x *_QueryClientPrecompilesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ClientPrecompile) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryClientPrecompilesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(ClientPrecompile) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryClientPrecompilesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryClientPrecompilesResponse_1_list) NewElement() protoreflect.Value { + v := new(ClientPrecompile) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryClientPrecompilesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryClientPrecompilesResponse protoreflect.MessageDescriptor + fd_QueryClientPrecompilesResponse_precompiles protoreflect.FieldDescriptor + fd_QueryClientPrecompilesResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_query_proto_init() + md_QueryClientPrecompilesResponse = File_cosmos_evm_ibc_clients_v1_query_proto.Messages().ByName("QueryClientPrecompilesResponse") + fd_QueryClientPrecompilesResponse_precompiles = md_QueryClientPrecompilesResponse.Fields().ByName("precompiles") + fd_QueryClientPrecompilesResponse_pagination = md_QueryClientPrecompilesResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientPrecompilesResponse)(nil) + +type fastReflection_QueryClientPrecompilesResponse QueryClientPrecompilesResponse + +func (x *QueryClientPrecompilesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientPrecompilesResponse)(x) +} + +func (x *QueryClientPrecompilesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryClientPrecompilesResponse_messageType fastReflection_QueryClientPrecompilesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientPrecompilesResponse_messageType{} + +type fastReflection_QueryClientPrecompilesResponse_messageType struct{} + +func (x fastReflection_QueryClientPrecompilesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientPrecompilesResponse)(nil) +} +func (x fastReflection_QueryClientPrecompilesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompilesResponse) +} +func (x fastReflection_QueryClientPrecompilesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompilesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientPrecompilesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientPrecompilesResponse +} + +// 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_QueryClientPrecompilesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryClientPrecompilesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientPrecompilesResponse) New() protoreflect.Message { + return new(fastReflection_QueryClientPrecompilesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientPrecompilesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryClientPrecompilesResponse)(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_QueryClientPrecompilesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Precompiles) != 0 { + value := protoreflect.ValueOfList(&_QueryClientPrecompilesResponse_1_list{list: &x.Precompiles}) + if !f(fd_QueryClientPrecompilesResponse_precompiles, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryClientPrecompilesResponse_pagination, 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_QueryClientPrecompilesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.precompiles": + return len(x.Precompiles) != 0 + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse 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_QueryClientPrecompilesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.precompiles": + x.Precompiles = nil + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse 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_QueryClientPrecompilesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.precompiles": + if len(x.Precompiles) == 0 { + return protoreflect.ValueOfList(&_QueryClientPrecompilesResponse_1_list{}) + } + listValue := &_QueryClientPrecompilesResponse_1_list{list: &x.Precompiles} + return protoreflect.ValueOfList(listValue) + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse 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_QueryClientPrecompilesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.precompiles": + lv := value.List() + clv := lv.(*_QueryClientPrecompilesResponse_1_list) + x.Precompiles = *clv.list + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse 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_QueryClientPrecompilesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.precompiles": + if x.Precompiles == nil { + x.Precompiles = []*ClientPrecompile{} + } + value := &_QueryClientPrecompilesResponse_1_list{list: &x.Precompiles} + return protoreflect.ValueOfList(value) + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse 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_QueryClientPrecompilesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.precompiles": + list := []*ClientPrecompile{} + return protoreflect.ValueOfList(&_QueryClientPrecompilesResponse_1_list{list: &list}) + case "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse 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_QueryClientPrecompilesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse", 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_QueryClientPrecompilesResponse) 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_QueryClientPrecompilesResponse) 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_QueryClientPrecompilesResponse) 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_QueryClientPrecompilesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientPrecompilesResponse) + 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.Precompiles) > 0 { + for _, e := range x.Precompiles { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryClientPrecompilesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Precompiles) > 0 { + for iNdEx := len(x.Precompiles) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Precompiles[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryClientPrecompilesResponse) + 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: QueryClientPrecompilesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientPrecompilesResponse: 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 Precompiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Precompiles = append(x.Precompiles, &ClientPrecompile{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Precompiles[len(x.Precompiles)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_query_proto_init() + md_QueryParamsRequest = File_cosmos_evm_ibc_clients_v1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// 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_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: 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_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_query_proto_init() + md_QueryParamsResponse = File_cosmos_evm_ibc_clients_v1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// 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_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + 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.Params != nil { + l = options.Size(x.Params) + 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().(*QueryParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/evm/ibc/clients/v1/query.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) +) + +// QueryClientPrecompileRequest is the request type for the +// Query/ClientPrecompile RPC +type QueryClientPrecompileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client can be either the ibc client identifier or the hex contract address + // of the precompile + Client string `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"` +} + +func (x *QueryClientPrecompileRequest) Reset() { + *x = QueryClientPrecompileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientPrecompileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientPrecompileRequest) ProtoMessage() {} + +// Deprecated: Use QueryClientPrecompileRequest.ProtoReflect.Descriptor instead. +func (*QueryClientPrecompileRequest) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryClientPrecompileRequest) GetClient() string { + if x != nil { + return x.Client + } + return "" +} + +// QueryClientPrecompileResponse is the response type for the +// Query/ClientPrecompile RPC +type QueryClientPrecompileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // precompile returns the info about a registered client precompile for the + // ibc clients module + Precompile *ClientPrecompile `protobuf:"bytes,1,opt,name=precompile,proto3" json:"precompile,omitempty"` +} + +func (x *QueryClientPrecompileResponse) Reset() { + *x = QueryClientPrecompileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientPrecompileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientPrecompileResponse) ProtoMessage() {} + +// Deprecated: Use QueryClientPrecompileResponse.ProtoReflect.Descriptor instead. +func (*QueryClientPrecompileResponse) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryClientPrecompileResponse) GetPrecompile() *ClientPrecompile { + if x != nil { + return x.Precompile + } + return nil +} + +// QueryClientPrecompilesRequest is the request type for the +// Query/ClientPrecompiles RPC +type QueryClientPrecompilesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryClientPrecompilesRequest) Reset() { + *x = QueryClientPrecompilesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientPrecompilesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientPrecompilesRequest) ProtoMessage() {} + +// Deprecated: Use QueryClientPrecompilesRequest.ProtoReflect.Descriptor instead. +func (*QueryClientPrecompilesRequest) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryClientPrecompilesRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryClientPrecompilesResponse is the response type for the +// Query/ClientPrecompiles RPC +type QueryClientPrecompilesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // precompiles is a slice of registered client precompiles for the ibc clients + // module + Precompiles []*ClientPrecompile `protobuf:"bytes,1,rep,name=precompiles,proto3" json:"precompiles,omitempty"` + // pagination defines the pagination in the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryClientPrecompilesResponse) Reset() { + *x = QueryClientPrecompilesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientPrecompilesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientPrecompilesResponse) ProtoMessage() {} + +// Deprecated: Use QueryClientPrecompilesResponse.ProtoReflect.Descriptor instead. +func (*QueryClientPrecompilesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryClientPrecompilesResponse) GetPrecompiles() []*ClientPrecompile { + if x != nil { + return x.Precompiles + } + return nil +} + +func (x *QueryClientPrecompilesResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_query_proto_rawDescGZIP(), []int{4} +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +var File_cosmos_evm_ibc_clients_v1_query_proto protoreflect.FileDescriptor + +var file_cosmos_evm_ibc_clients_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, 0x62, + 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, 0x0a, 0x1c, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x22, 0x6c, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x22, + 0x67, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb8, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0b, 0x70, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x0b, 0x70, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x13, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0xaf, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0xc9, 0x01, 0x0a, 0x10, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, + 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, + 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x2f, 0x7b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x7d, 0x12, 0xc4, 0x01, 0x0a, + 0x11, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, + 0x6d, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, + 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xea, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, + 0x04, 0x43, 0x45, 0x49, 0x43, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x45, + 0x76, 0x6d, 0x2e, 0x49, 0x62, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x49, + 0x62, 0x63, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x49, 0x62, 0x63, 0x5c, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x49, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_evm_ibc_clients_v1_query_proto_rawDescOnce sync.Once + file_cosmos_evm_ibc_clients_v1_query_proto_rawDescData = file_cosmos_evm_ibc_clients_v1_query_proto_rawDesc +) + +func file_cosmos_evm_ibc_clients_v1_query_proto_rawDescGZIP() []byte { + file_cosmos_evm_ibc_clients_v1_query_proto_rawDescOnce.Do(func() { + file_cosmos_evm_ibc_clients_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_evm_ibc_clients_v1_query_proto_rawDescData) + }) + return file_cosmos_evm_ibc_clients_v1_query_proto_rawDescData +} + +var file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cosmos_evm_ibc_clients_v1_query_proto_goTypes = []interface{}{ + (*QueryClientPrecompileRequest)(nil), // 0: cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest + (*QueryClientPrecompileResponse)(nil), // 1: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse + (*QueryClientPrecompilesRequest)(nil), // 2: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest + (*QueryClientPrecompilesResponse)(nil), // 3: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse + (*QueryParamsRequest)(nil), // 4: cosmos.evm.ibc.clients.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 5: cosmos.evm.ibc.clients.v1.QueryParamsResponse + (*ClientPrecompile)(nil), // 6: cosmos.evm.ibc.clients.v1.ClientPrecompile + (*v1beta1.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 8: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 9: cosmos.evm.ibc.clients.v1.Params +} +var file_cosmos_evm_ibc_clients_v1_query_proto_depIdxs = []int32{ + 6, // 0: cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse.precompile:type_name -> cosmos.evm.ibc.clients.v1.ClientPrecompile + 7, // 1: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 6, // 2: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.precompiles:type_name -> cosmos.evm.ibc.clients.v1.ClientPrecompile + 8, // 3: cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 9, // 4: cosmos.evm.ibc.clients.v1.QueryParamsResponse.params:type_name -> cosmos.evm.ibc.clients.v1.Params + 0, // 5: cosmos.evm.ibc.clients.v1.Query.ClientPrecompile:input_type -> cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest + 2, // 6: cosmos.evm.ibc.clients.v1.Query.ClientPrecompiles:input_type -> cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest + 4, // 7: cosmos.evm.ibc.clients.v1.Query.Params:input_type -> cosmos.evm.ibc.clients.v1.QueryParamsRequest + 1, // 8: cosmos.evm.ibc.clients.v1.Query.ClientPrecompile:output_type -> cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse + 3, // 9: cosmos.evm.ibc.clients.v1.Query.ClientPrecompiles:output_type -> cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse + 5, // 10: cosmos.evm.ibc.clients.v1.Query.Params:output_type -> cosmos.evm.ibc.clients.v1.QueryParamsResponse + 8, // [8:11] is the sub-list for method output_type + 5, // [5:8] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_cosmos_evm_ibc_clients_v1_query_proto_init() } +func file_cosmos_evm_ibc_clients_v1_query_proto_init() { + if File_cosmos_evm_ibc_clients_v1_query_proto != nil { + return + } + file_cosmos_evm_ibc_clients_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientPrecompileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientPrecompileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientPrecompilesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientPrecompilesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_evm_ibc_clients_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_evm_ibc_clients_v1_query_proto_goTypes, + DependencyIndexes: file_cosmos_evm_ibc_clients_v1_query_proto_depIdxs, + MessageInfos: file_cosmos_evm_ibc_clients_v1_query_proto_msgTypes, + }.Build() + File_cosmos_evm_ibc_clients_v1_query_proto = out.File + file_cosmos_evm_ibc_clients_v1_query_proto_rawDesc = nil + file_cosmos_evm_ibc_clients_v1_query_proto_goTypes = nil + file_cosmos_evm_ibc_clients_v1_query_proto_depIdxs = nil +} diff --git a/api/cosmos/evm/ibc/clients/v1/query_grpc.pb.go b/api/cosmos/evm/ibc/clients/v1/query_grpc.pb.go new file mode 100644 index 000000000..e944d51c0 --- /dev/null +++ b/api/cosmos/evm/ibc/clients/v1/query_grpc.pb.go @@ -0,0 +1,191 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: cosmos/evm/ibc/clients/v1/query.proto + +package clientsv1 + +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.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_ClientPrecompile_FullMethodName = "/cosmos.evm.ibc.clients.v1.Query/ClientPrecompile" + Query_ClientPrecompiles_FullMethodName = "/cosmos.evm.ibc.clients.v1.Query/ClientPrecompiles" + Query_Params_FullMethodName = "/cosmos.evm.ibc.clients.v1.Query/Params" +) + +// QueryClient is the client API for Query 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. +type QueryClient interface { + // ClientPrecompile returns the registered client precompile for a given + // client. + ClientPrecompile(ctx context.Context, in *QueryClientPrecompileRequest, opts ...grpc.CallOption) (*QueryClientPrecompileResponse, error) + // ClientPrecompiles returns all the ClientPrecompile values. + ClientPrecompiles(ctx context.Context, in *QueryClientPrecompilesRequest, opts ...grpc.CallOption) (*QueryClientPrecompilesResponse, error) + // Params returns the module parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ClientPrecompile(ctx context.Context, in *QueryClientPrecompileRequest, opts ...grpc.CallOption) (*QueryClientPrecompileResponse, error) { + out := new(QueryClientPrecompileResponse) + err := c.cc.Invoke(ctx, Query_ClientPrecompile_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ClientPrecompiles(ctx context.Context, in *QueryClientPrecompilesRequest, opts ...grpc.CallOption) (*QueryClientPrecompilesResponse, error) { + out := new(QueryClientPrecompilesResponse) + err := c.cc.Invoke(ctx, Query_ClientPrecompiles_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // ClientPrecompile returns the registered client precompile for a given + // client. + ClientPrecompile(context.Context, *QueryClientPrecompileRequest) (*QueryClientPrecompileResponse, error) + // ClientPrecompiles returns all the ClientPrecompile values. + ClientPrecompiles(context.Context, *QueryClientPrecompilesRequest) (*QueryClientPrecompilesResponse, error) + // Params returns the module parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) ClientPrecompile(context.Context, *QueryClientPrecompileRequest) (*QueryClientPrecompileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClientPrecompile not implemented") +} +func (UnimplementedQueryServer) ClientPrecompiles(context.Context, *QueryClientPrecompilesRequest) (*QueryClientPrecompilesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClientPrecompiles not implemented") +} +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_ClientPrecompile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClientPrecompileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClientPrecompile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ClientPrecompile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClientPrecompile(ctx, req.(*QueryClientPrecompileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ClientPrecompiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClientPrecompilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClientPrecompiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ClientPrecompiles_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClientPrecompiles(ctx, req.(*QueryClientPrecompilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.evm.ibc.clients.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ClientPrecompile", + Handler: _Query_ClientPrecompile_Handler, + }, + { + MethodName: "ClientPrecompiles", + Handler: _Query_ClientPrecompiles_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/evm/ibc/clients/v1/query.proto", +} diff --git a/api/cosmos/evm/ibc/clients/v1/tx.pulsar.go b/api/cosmos/evm/ibc/clients/v1/tx.pulsar.go new file mode 100644 index 000000000..c05fef78f --- /dev/null +++ b/api/cosmos/evm/ibc/clients/v1/tx.pulsar.go @@ -0,0 +1,2136 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package clientsv1 + +import ( + _ "cosmossdk.io/api/amino" + _ "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" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgRegisterClientPrecompile protoreflect.MessageDescriptor + fd_MsgRegisterClientPrecompile_sender protoreflect.FieldDescriptor + fd_MsgRegisterClientPrecompile_client_id protoreflect.FieldDescriptor + fd_MsgRegisterClientPrecompile_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_tx_proto_init() + md_MsgRegisterClientPrecompile = File_cosmos_evm_ibc_clients_v1_tx_proto.Messages().ByName("MsgRegisterClientPrecompile") + fd_MsgRegisterClientPrecompile_sender = md_MsgRegisterClientPrecompile.Fields().ByName("sender") + fd_MsgRegisterClientPrecompile_client_id = md_MsgRegisterClientPrecompile.Fields().ByName("client_id") + fd_MsgRegisterClientPrecompile_address = md_MsgRegisterClientPrecompile.Fields().ByName("address") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterClientPrecompile)(nil) + +type fastReflection_MsgRegisterClientPrecompile MsgRegisterClientPrecompile + +func (x *MsgRegisterClientPrecompile) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterClientPrecompile)(x) +} + +func (x *MsgRegisterClientPrecompile) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_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_MsgRegisterClientPrecompile_messageType fastReflection_MsgRegisterClientPrecompile_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterClientPrecompile_messageType{} + +type fastReflection_MsgRegisterClientPrecompile_messageType struct{} + +func (x fastReflection_MsgRegisterClientPrecompile_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterClientPrecompile)(nil) +} +func (x fastReflection_MsgRegisterClientPrecompile_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterClientPrecompile) +} +func (x fastReflection_MsgRegisterClientPrecompile_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterClientPrecompile +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterClientPrecompile) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterClientPrecompile +} + +// 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_MsgRegisterClientPrecompile) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterClientPrecompile_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterClientPrecompile) New() protoreflect.Message { + return new(fastReflection_MsgRegisterClientPrecompile) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterClientPrecompile) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterClientPrecompile)(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_MsgRegisterClientPrecompile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgRegisterClientPrecompile_sender, value) { + return + } + } + if x.ClientId != "" { + value := protoreflect.ValueOfString(x.ClientId) + if !f(fd_MsgRegisterClientPrecompile_client_id, value) { + return + } + } + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_MsgRegisterClientPrecompile_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterClientPrecompile) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.sender": + return x.Sender != "" + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.client_id": + return x.ClientId != "" + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.address": + return x.Address != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile 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_MsgRegisterClientPrecompile) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.sender": + x.Sender = "" + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.client_id": + x.ClientId = "" + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.address": + x.Address = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile 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_MsgRegisterClientPrecompile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.client_id": + value := x.ClientId + return protoreflect.ValueOfString(value) + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.address": + value := x.Address + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile 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_MsgRegisterClientPrecompile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.sender": + x.Sender = value.Interface().(string) + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.client_id": + x.ClientId = value.Interface().(string) + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.address": + x.Address = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile 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_MsgRegisterClientPrecompile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.sender": + panic(fmt.Errorf("field sender of message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile is not mutable")) + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.client_id": + panic(fmt.Errorf("field client_id of message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile is not mutable")) + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.address": + panic(fmt.Errorf("field address of message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile 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_MsgRegisterClientPrecompile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.sender": + return protoreflect.ValueOfString("") + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.client_id": + return protoreflect.ValueOfString("") + case "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile.address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile 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_MsgRegisterClientPrecompile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile", 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_MsgRegisterClientPrecompile) 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_MsgRegisterClientPrecompile) 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_MsgRegisterClientPrecompile) 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_MsgRegisterClientPrecompile) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterClientPrecompile) + 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.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ClientId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Address) + 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().(*MsgRegisterClientPrecompile) + 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.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0x1a + } + if len(x.ClientId) > 0 { + i -= len(x.ClientId) + copy(dAtA[i:], x.ClientId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClientId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + 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().(*MsgRegisterClientPrecompile) + 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: MsgRegisterClientPrecompile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterClientPrecompile: 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 Sender", 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.Sender = 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 ClientId", 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.ClientId = 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 Address", 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.Address = 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_MsgRegisterClientPrecompileResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_tx_proto_init() + md_MsgRegisterClientPrecompileResponse = File_cosmos_evm_ibc_clients_v1_tx_proto.Messages().ByName("MsgRegisterClientPrecompileResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterClientPrecompileResponse)(nil) + +type fastReflection_MsgRegisterClientPrecompileResponse MsgRegisterClientPrecompileResponse + +func (x *MsgRegisterClientPrecompileResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterClientPrecompileResponse)(x) +} + +func (x *MsgRegisterClientPrecompileResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_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_MsgRegisterClientPrecompileResponse_messageType fastReflection_MsgRegisterClientPrecompileResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterClientPrecompileResponse_messageType{} + +type fastReflection_MsgRegisterClientPrecompileResponse_messageType struct{} + +func (x fastReflection_MsgRegisterClientPrecompileResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterClientPrecompileResponse)(nil) +} +func (x fastReflection_MsgRegisterClientPrecompileResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterClientPrecompileResponse) +} +func (x fastReflection_MsgRegisterClientPrecompileResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterClientPrecompileResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterClientPrecompileResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterClientPrecompileResponse +} + +// 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_MsgRegisterClientPrecompileResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterClientPrecompileResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterClientPrecompileResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterClientPrecompileResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterClientPrecompileResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterClientPrecompileResponse)(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_MsgRegisterClientPrecompileResponse) 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_MsgRegisterClientPrecompileResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse 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_MsgRegisterClientPrecompileResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse 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_MsgRegisterClientPrecompileResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse 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_MsgRegisterClientPrecompileResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse 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_MsgRegisterClientPrecompileResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse 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_MsgRegisterClientPrecompileResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse 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_MsgRegisterClientPrecompileResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse", 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_MsgRegisterClientPrecompileResponse) 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_MsgRegisterClientPrecompileResponse) 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_MsgRegisterClientPrecompileResponse) 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_MsgRegisterClientPrecompileResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterClientPrecompileResponse) + 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().(*MsgRegisterClientPrecompileResponse) + 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().(*MsgRegisterClientPrecompileResponse) + 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: MsgRegisterClientPrecompileResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterClientPrecompileResponse: 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_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_tx_proto_init() + md_MsgUpdateParams = File_cosmos_evm_ibc_clients_v1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_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_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// 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_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(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_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, 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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.authority": + return x.Authority != "" + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParams 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_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.authority": + x.Authority = "" + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParams 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParams 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_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParams 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_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message cosmos.evm.ibc.clients.v1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParams 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "cosmos.evm.ibc.clients.v1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParams 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.MsgUpdateParams", 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + 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.Params != nil { + l = options.Size(x.Params) + 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().(*MsgUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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.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().(*MsgUpdateParams) + 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: 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 + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_tx_proto_init() + md_MsgUpdateParamsResponse = File_cosmos_evm_ibc_clients_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_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_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse", 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + 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().(*MsgUpdateParamsResponse) + 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().(*MsgUpdateParamsResponse) + 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: 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: cosmos/evm/ibc/clients/v1/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) +) + +// MsgRegisterClientPrecompile defines the Msg/RegisterClientPrecompile request +// type. +type MsgRegisterClientPrecompile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sender is the message sender. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // client_id defines the ibc client id to be mapped to + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // address is the hex address of the light client contract + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *MsgRegisterClientPrecompile) Reset() { + *x = MsgRegisterClientPrecompile{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterClientPrecompile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterClientPrecompile) ProtoMessage() {} + +// Deprecated: Use MsgRegisterClientPrecompile.ProtoReflect.Descriptor instead. +func (*MsgRegisterClientPrecompile) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgRegisterClientPrecompile) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgRegisterClientPrecompile) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *MsgRegisterClientPrecompile) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// MsgRegisterClientPrecompileResponse defines the Msg/RegisterClientPrecompile +// response type. +type MsgRegisterClientPrecompileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRegisterClientPrecompileResponse) Reset() { + *x = MsgRegisterClientPrecompileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterClientPrecompileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterClientPrecompileResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterClientPrecompileResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterClientPrecompileResponse) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module + // NOTE: Defaults to the governance module unless overwritten. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the module parameters to update. + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescGZIP(), []int{3} +} + +var File_cosmos_evm_ibc_clients_v1_tx_proto protoreflect.FileDescriptor + +var file_cosmos_evm_ibc_clients_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, + 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, + 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 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, 0x1a, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x3a, 0x44, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, + 0xe7, 0xb0, 0x2a, 0x34, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x78, + 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, + 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xcc, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x3a, 0x3b, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x28, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, + 0x2f, 0x78, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x91, 0x02, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x92, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x36, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x1a, 0x3e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xe7, 0x01, + 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, + 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x04, 0x43, 0x45, 0x49, 0x43, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x45, 0x76, 0x6d, 0x2e, 0x49, 0x62, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x6d, + 0x5c, 0x49, 0x62, 0x63, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x49, 0x62, 0x63, + 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x3a, 0x3a, 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x49, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescOnce sync.Once + file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescData = file_cosmos_evm_ibc_clients_v1_tx_proto_rawDesc +) + +func file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescGZIP() []byte { + file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescOnce.Do(func() { + file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescData) + }) + return file_cosmos_evm_ibc_clients_v1_tx_proto_rawDescData +} + +var file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_evm_ibc_clients_v1_tx_proto_goTypes = []interface{}{ + (*MsgRegisterClientPrecompile)(nil), // 0: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile + (*MsgRegisterClientPrecompileResponse)(nil), // 1: cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse + (*MsgUpdateParams)(nil), // 2: cosmos.evm.ibc.clients.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 3: cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse + (*Params)(nil), // 4: cosmos.evm.ibc.clients.v1.Params +} +var file_cosmos_evm_ibc_clients_v1_tx_proto_depIdxs = []int32{ + 4, // 0: cosmos.evm.ibc.clients.v1.MsgUpdateParams.params:type_name -> cosmos.evm.ibc.clients.v1.Params + 0, // 1: cosmos.evm.ibc.clients.v1.Msg.RegisterClientPrecompile:input_type -> cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile + 2, // 2: cosmos.evm.ibc.clients.v1.Msg.UpdateParams:input_type -> cosmos.evm.ibc.clients.v1.MsgUpdateParams + 1, // 3: cosmos.evm.ibc.clients.v1.Msg.RegisterClientPrecompile:output_type -> cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse + 3, // 4: cosmos.evm.ibc.clients.v1.Msg.UpdateParams:output_type -> cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_cosmos_evm_ibc_clients_v1_tx_proto_init() } +func file_cosmos_evm_ibc_clients_v1_tx_proto_init() { + if File_cosmos_evm_ibc_clients_v1_tx_proto != nil { + return + } + file_cosmos_evm_ibc_clients_v1_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterClientPrecompile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterClientPrecompileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_evm_ibc_clients_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_evm_ibc_clients_v1_tx_proto_goTypes, + DependencyIndexes: file_cosmos_evm_ibc_clients_v1_tx_proto_depIdxs, + MessageInfos: file_cosmos_evm_ibc_clients_v1_tx_proto_msgTypes, + }.Build() + File_cosmos_evm_ibc_clients_v1_tx_proto = out.File + file_cosmos_evm_ibc_clients_v1_tx_proto_rawDesc = nil + file_cosmos_evm_ibc_clients_v1_tx_proto_goTypes = nil + file_cosmos_evm_ibc_clients_v1_tx_proto_depIdxs = nil +} diff --git a/api/cosmos/evm/ibc/clients/v1/tx_grpc.pb.go b/api/cosmos/evm/ibc/clients/v1/tx_grpc.pb.go new file mode 100644 index 000000000..2d918155d --- /dev/null +++ b/api/cosmos/evm/ibc/clients/v1/tx_grpc.pb.go @@ -0,0 +1,150 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: cosmos/evm/ibc/clients/v1/tx.proto + +package clientsv1 + +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.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_RegisterClientPrecompile_FullMethodName = "/cosmos.evm.ibc.clients.v1.Msg/RegisterClientPrecompile" + Msg_UpdateParams_FullMethodName = "/cosmos.evm.ibc.clients.v1.Msg/UpdateParams" +) + +// 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. +type MsgClient interface { + // RegisterClientPrecompile registers a client precompile mapping. + RegisterClientPrecompile(ctx context.Context, in *MsgRegisterClientPrecompile, opts ...grpc.CallOption) (*MsgRegisterClientPrecompileResponse, error) + // UpdateParams updates the module parameters. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) RegisterClientPrecompile(ctx context.Context, in *MsgRegisterClientPrecompile, opts ...grpc.CallOption) (*MsgRegisterClientPrecompileResponse, error) { + out := new(MsgRegisterClientPrecompileResponse) + err := c.cc.Invoke(ctx, Msg_RegisterClientPrecompile_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // RegisterClientPrecompile registers a client precompile mapping. + RegisterClientPrecompile(context.Context, *MsgRegisterClientPrecompile) (*MsgRegisterClientPrecompileResponse, error) + // UpdateParams updates the module parameters. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) RegisterClientPrecompile(context.Context, *MsgRegisterClientPrecompile) (*MsgRegisterClientPrecompileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterClientPrecompile not implemented") +} +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams 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_RegisterClientPrecompile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterClientPrecompile) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterClientPrecompile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RegisterClientPrecompile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterClientPrecompile(ctx, req.(*MsgRegisterClientPrecompile)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + 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: "cosmos.evm.ibc.clients.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterClientPrecompile", + Handler: _Msg_RegisterClientPrecompile_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/evm/ibc/clients/v1/tx.proto", +} diff --git a/api/cosmos/evm/ibc/clients/v1/types.pulsar.go b/api/cosmos/evm/ibc/clients/v1/types.pulsar.go new file mode 100644 index 000000000..e057d8090 --- /dev/null +++ b/api/cosmos/evm/ibc/clients/v1/types.pulsar.go @@ -0,0 +1,1761 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package clientsv1 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Params protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_types_proto_init() + md_Params = File_cosmos_evm_ibc_clients_v1_types_proto.Messages().ByName("Params") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_types_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_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// 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_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(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_Params) 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_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.Params")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.Params")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.Params")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.Params")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.Params")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.Params")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + 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().(*Params) + 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().(*Params) + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: 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_ClientPrecompile protoreflect.MessageDescriptor + fd_ClientPrecompile_client_id protoreflect.FieldDescriptor + fd_ClientPrecompile_address protoreflect.FieldDescriptor + fd_ClientPrecompile_enabled protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_types_proto_init() + md_ClientPrecompile = File_cosmos_evm_ibc_clients_v1_types_proto.Messages().ByName("ClientPrecompile") + fd_ClientPrecompile_client_id = md_ClientPrecompile.Fields().ByName("client_id") + fd_ClientPrecompile_address = md_ClientPrecompile.Fields().ByName("address") + fd_ClientPrecompile_enabled = md_ClientPrecompile.Fields().ByName("enabled") +} + +var _ protoreflect.Message = (*fastReflection_ClientPrecompile)(nil) + +type fastReflection_ClientPrecompile ClientPrecompile + +func (x *ClientPrecompile) ProtoReflect() protoreflect.Message { + return (*fastReflection_ClientPrecompile)(x) +} + +func (x *ClientPrecompile) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_types_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_ClientPrecompile_messageType fastReflection_ClientPrecompile_messageType +var _ protoreflect.MessageType = fastReflection_ClientPrecompile_messageType{} + +type fastReflection_ClientPrecompile_messageType struct{} + +func (x fastReflection_ClientPrecompile_messageType) Zero() protoreflect.Message { + return (*fastReflection_ClientPrecompile)(nil) +} +func (x fastReflection_ClientPrecompile_messageType) New() protoreflect.Message { + return new(fastReflection_ClientPrecompile) +} +func (x fastReflection_ClientPrecompile_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ClientPrecompile +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ClientPrecompile) Descriptor() protoreflect.MessageDescriptor { + return md_ClientPrecompile +} + +// 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_ClientPrecompile) Type() protoreflect.MessageType { + return _fastReflection_ClientPrecompile_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ClientPrecompile) New() protoreflect.Message { + return new(fastReflection_ClientPrecompile) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ClientPrecompile) Interface() protoreflect.ProtoMessage { + return (*ClientPrecompile)(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_ClientPrecompile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ClientId != "" { + value := protoreflect.ValueOfString(x.ClientId) + if !f(fd_ClientPrecompile_client_id, value) { + return + } + } + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_ClientPrecompile_address, value) { + return + } + } + if x.Enabled != false { + value := protoreflect.ValueOfBool(x.Enabled) + if !f(fd_ClientPrecompile_enabled, 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_ClientPrecompile) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.client_id": + return x.ClientId != "" + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.address": + return x.Address != "" + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.enabled": + return x.Enabled != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.ClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.ClientPrecompile 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_ClientPrecompile) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.client_id": + x.ClientId = "" + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.address": + x.Address = "" + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.enabled": + x.Enabled = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.ClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.ClientPrecompile 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_ClientPrecompile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.client_id": + value := x.ClientId + return protoreflect.ValueOfString(value) + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.enabled": + value := x.Enabled + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.ClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.ClientPrecompile 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_ClientPrecompile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.client_id": + x.ClientId = value.Interface().(string) + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.address": + x.Address = value.Interface().(string) + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.enabled": + x.Enabled = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.ClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.ClientPrecompile 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_ClientPrecompile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.client_id": + panic(fmt.Errorf("field client_id of message cosmos.evm.ibc.clients.v1.ClientPrecompile is not mutable")) + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.address": + panic(fmt.Errorf("field address of message cosmos.evm.ibc.clients.v1.ClientPrecompile is not mutable")) + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.enabled": + panic(fmt.Errorf("field enabled of message cosmos.evm.ibc.clients.v1.ClientPrecompile is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.ClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.ClientPrecompile 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_ClientPrecompile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.client_id": + return protoreflect.ValueOfString("") + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.address": + return protoreflect.ValueOfString("") + case "cosmos.evm.ibc.clients.v1.ClientPrecompile.enabled": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.ClientPrecompile")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.ClientPrecompile 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_ClientPrecompile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.ClientPrecompile", 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_ClientPrecompile) 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_ClientPrecompile) 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_ClientPrecompile) 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_ClientPrecompile) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ClientPrecompile) + 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.ClientId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Enabled { + n += 2 + } + 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().(*ClientPrecompile) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Enabled { + i-- + if x.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0x12 + } + if len(x.ClientId) > 0 { + i -= len(x.ClientId) + copy(dAtA[i:], x.ClientId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClientId))) + 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().(*ClientPrecompile) + 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: ClientPrecompile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ClientPrecompile: 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 ClientId", 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.ClientId = 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 Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Enabled = bool(v != 0) + 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 = (*_GenesisState_1_list)(nil) + +type _GenesisState_1_list struct { + list *[]*ClientPrecompile +} + +func (x *_GenesisState_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ClientPrecompile) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ClientPrecompile) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { + v := new(ClientPrecompile) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_1_list) NewElement() protoreflect.Value { + v := new(ClientPrecompile) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_client_precompiles protoreflect.FieldDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_evm_ibc_clients_v1_types_proto_init() + md_GenesisState = File_cosmos_evm_ibc_clients_v1_types_proto.Messages().ByName("GenesisState") + fd_GenesisState_client_precompiles = md_GenesisState.Fields().ByName("client_precompiles") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_evm_ibc_clients_v1_types_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_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// 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_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(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_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ClientPrecompiles) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.ClientPrecompiles}) + if !f(fd_GenesisState_client_precompiles, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, 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_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.GenesisState.client_precompiles": + return len(x.ClientPrecompiles) != 0 + case "cosmos.evm.ibc.clients.v1.GenesisState.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.GenesisState 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_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.GenesisState.client_precompiles": + x.ClientPrecompiles = nil + case "cosmos.evm.ibc.clients.v1.GenesisState.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.GenesisState 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_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.evm.ibc.clients.v1.GenesisState.client_precompiles": + if len(x.ClientPrecompiles) == 0 { + return protoreflect.ValueOfList(&_GenesisState_1_list{}) + } + listValue := &_GenesisState_1_list{list: &x.ClientPrecompiles} + return protoreflect.ValueOfList(listValue) + case "cosmos.evm.ibc.clients.v1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.GenesisState 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_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.GenesisState.client_precompiles": + lv := value.List() + clv := lv.(*_GenesisState_1_list) + x.ClientPrecompiles = *clv.list + case "cosmos.evm.ibc.clients.v1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.GenesisState 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_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.GenesisState.client_precompiles": + if x.ClientPrecompiles == nil { + x.ClientPrecompiles = []*ClientPrecompile{} + } + value := &_GenesisState_1_list{list: &x.ClientPrecompiles} + return protoreflect.ValueOfList(value) + case "cosmos.evm.ibc.clients.v1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.GenesisState 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_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.evm.ibc.clients.v1.GenesisState.client_precompiles": + list := []*ClientPrecompile{} + return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) + case "cosmos.evm.ibc.clients.v1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.evm.ibc.clients.v1.GenesisState")) + } + panic(fmt.Errorf("message cosmos.evm.ibc.clients.v1.GenesisState 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_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.evm.ibc.clients.v1.GenesisState", 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_GenesisState) 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_GenesisState) 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_GenesisState) 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_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + 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.ClientPrecompiles) > 0 { + for _, e := range x.ClientPrecompiles { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Params != nil { + l = options.Size(x.Params) + 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().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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.ClientPrecompiles) > 0 { + for iNdEx := len(x.ClientPrecompiles) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ClientPrecompiles[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: 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 ClientPrecompiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ClientPrecompiles = append(x.ClientPrecompiles, &ClientPrecompile{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientPrecompiles[len(x.ClientPrecompiles)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/evm/ibc/clients/v1/types.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) +) + +// Params defines the clients module params +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_types_proto_rawDescGZIP(), []int{0} +} + +// ClientPrecompile defines an instance that records a pairing (mapping) +// consisting of a native light client and a contract address. +type ClientPrecompile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client_id defines the ibc client id to be mapped to + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // address is the hex address of the light client contract + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // enabled defines the token mapping enable status + Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (x *ClientPrecompile) Reset() { + *x = ClientPrecompile{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientPrecompile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientPrecompile) ProtoMessage() {} + +// Deprecated: Use ClientPrecompile.ProtoReflect.Descriptor instead. +func (*ClientPrecompile) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_types_proto_rawDescGZIP(), []int{1} +} + +func (x *ClientPrecompile) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *ClientPrecompile) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ClientPrecompile) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +// GenesisState is the state that must be provided at genesis. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client_precompiles is a slice of the registered client precompiles + ClientPrecompiles []*ClientPrecompile `protobuf:"bytes,1,rep,name=client_precompiles,json=clientPrecompiles,proto3" json:"client_precompiles,omitempty"` + // params defines all the parameters of the module. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_cosmos_evm_ibc_clients_v1_types_proto_rawDescGZIP(), []int{2} +} + +func (x *GenesisState) GetClientPrecompiles() []*ClientPrecompile { + if x != nil { + return x.ClientPrecompiles + } + return nil +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +var File_cosmos_evm_ibc_clients_v1_types_proto protoreflect.FileDescriptor + +var file_cosmos_evm_ibc_clients_v1_types_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x08, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x63, 0x0a, 0x10, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xbb, 0x01, 0x0a, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x65, 0x0a, 0x12, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x11, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x65, 0x73, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xea, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x65, 0x76, 0x6d, 0x2e, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x65, 0x76, 0x6d, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x76, 0x31, 0xa2, 0x02, + 0x04, 0x43, 0x45, 0x49, 0x43, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x45, + 0x76, 0x6d, 0x2e, 0x49, 0x62, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x49, + 0x62, 0x63, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x45, 0x76, 0x6d, 0x5c, 0x49, 0x62, 0x63, 0x5c, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x45, 0x76, 0x6d, 0x3a, 0x3a, 0x49, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_evm_ibc_clients_v1_types_proto_rawDescOnce sync.Once + file_cosmos_evm_ibc_clients_v1_types_proto_rawDescData = file_cosmos_evm_ibc_clients_v1_types_proto_rawDesc +) + +func file_cosmos_evm_ibc_clients_v1_types_proto_rawDescGZIP() []byte { + file_cosmos_evm_ibc_clients_v1_types_proto_rawDescOnce.Do(func() { + file_cosmos_evm_ibc_clients_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_evm_ibc_clients_v1_types_proto_rawDescData) + }) + return file_cosmos_evm_ibc_clients_v1_types_proto_rawDescData +} + +var file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_evm_ibc_clients_v1_types_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: cosmos.evm.ibc.clients.v1.Params + (*ClientPrecompile)(nil), // 1: cosmos.evm.ibc.clients.v1.ClientPrecompile + (*GenesisState)(nil), // 2: cosmos.evm.ibc.clients.v1.GenesisState +} +var file_cosmos_evm_ibc_clients_v1_types_proto_depIdxs = []int32{ + 1, // 0: cosmos.evm.ibc.clients.v1.GenesisState.client_precompiles:type_name -> cosmos.evm.ibc.clients.v1.ClientPrecompile + 0, // 1: cosmos.evm.ibc.clients.v1.GenesisState.params:type_name -> cosmos.evm.ibc.clients.v1.Params + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_cosmos_evm_ibc_clients_v1_types_proto_init() } +func file_cosmos_evm_ibc_clients_v1_types_proto_init() { + if File_cosmos_evm_ibc_clients_v1_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientPrecompile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_evm_ibc_clients_v1_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_evm_ibc_clients_v1_types_proto_goTypes, + DependencyIndexes: file_cosmos_evm_ibc_clients_v1_types_proto_depIdxs, + MessageInfos: file_cosmos_evm_ibc_clients_v1_types_proto_msgTypes, + }.Build() + File_cosmos_evm_ibc_clients_v1_types_proto = out.File + file_cosmos_evm_ibc_clients_v1_types_proto_rawDesc = nil + file_cosmos_evm_ibc_clients_v1_types_proto_goTypes = nil + file_cosmos_evm_ibc_clients_v1_types_proto_depIdxs = nil +} diff --git a/config/evmd_config.go b/config/evmd_config.go index 2f9303699..2f964cfc6 100644 --- a/config/evmd_config.go +++ b/config/evmd_config.go @@ -10,6 +10,7 @@ import ( cosmosevmutils "github.com/cosmos/evm/utils" erc20types "github.com/cosmos/evm/x/erc20/types" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" + ibcclientstypes "github.com/cosmos/evm/x/ibc/clients/types" precisebanktypes "github.com/cosmos/evm/x/precisebank/types" evmtypes "github.com/cosmos/evm/x/vm/types" ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" @@ -47,6 +48,7 @@ var maccPerms = map[string][]string{ feemarkettypes.ModuleName: nil, erc20types.ModuleName: {authtypes.Minter, authtypes.Burner}, precisebanktypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + ibcclientstypes.ModuleName: nil, } // BlockedAddresses returns all the app's blocked account addresses. diff --git a/evmd/app.go b/evmd/app.go index f07b0a471..464fd621e 100644 --- a/evmd/app.go +++ b/evmd/app.go @@ -36,6 +36,9 @@ import ( feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper" feemarkettypes "github.com/cosmos/evm/x/feemarket/types" ibccallbackskeeper "github.com/cosmos/evm/x/ibc/callbacks/keeper" + ibcclients "github.com/cosmos/evm/x/ibc/clients" + ibcclientskeeper "github.com/cosmos/evm/x/ibc/clients/keeper" + ibcclientstypes "github.com/cosmos/evm/x/ibc/clients/types" "github.com/cosmos/evm/x/ibc/transfer" transferkeeper "github.com/cosmos/evm/x/ibc/transfer/keeper" @@ -190,6 +193,7 @@ type EVMD struct { FeeMarketKeeper feemarketkeeper.Keeper EVMKeeper *evmkeeper.Keeper Erc20Keeper erc20keeper.Keeper + ClientsKeeper ibcclientskeeper.Keeper PreciseBankKeeper precisebankkeeper.Keeper EVMMempool *evmmempool.ExperimentalEVMMempool @@ -243,6 +247,7 @@ func NewExampleApp( ibcexported.StoreKey, ibctransfertypes.StoreKey, // Cosmos EVM store keys evmtypes.StoreKey, feemarkettypes.StoreKey, erc20types.StoreKey, precisebanktypes.StoreKey, + ibcclientstypes.StoreKey, ) tkeys := storetypes.NewTransientStoreKeys(evmtypes.TransientKey, feemarkettypes.TransientKey) @@ -405,7 +410,7 @@ func NewExampleApp( app.GovKeeper = *govKeeper.SetHooks( govtypes.NewMultiGovHooks( - // register the governance hooks + // register the governance hooks ), ) @@ -452,6 +457,7 @@ func NewExampleApp( app.FeeMarketKeeper, &app.ConsensusParamsKeeper, &app.Erc20Keeper, + &app.ClientsKeeper, evmChainID, tracer, ).WithStaticPrecompiles( @@ -479,6 +485,16 @@ func NewExampleApp( &app.TransferKeeper, ) + app.ClientsKeeper = ibcclientskeeper.NewKeeper( + appCodec, + app.AccountKeeper.AddressCodec(), + runtime.NewKVStoreService(keys[ibcclientstypes.StoreKey]), + authtypes.NewModuleAddress(govtypes.ModuleName), + app.EVMKeeper, + app.IBCKeeper.ClientKeeper, + app.PreciseBankKeeper, + ) + // instantiate IBC transfer keeper AFTER the ERC-20 keeper to use it in the instantiation app.TransferKeeper = transferkeeper.NewKeeper( appCodec, @@ -573,6 +589,7 @@ func NewExampleApp( feemarket.NewAppModule(app.FeeMarketKeeper), erc20.NewAppModule(app.Erc20Keeper, app.AccountKeeper), precisebank.NewAppModule(app.PreciseBankKeeper, app.BankKeeper, app.AccountKeeper), + ibcclients.NewAppModule(&app.ClientsKeeper), ) // BasicModuleManager defines the module BasicManager which is in charge of setting up basic, @@ -611,7 +628,7 @@ func NewExampleApp( ibcexported.ModuleName, ibctransfertypes.ModuleName, // Cosmos EVM BeginBlockers - erc20types.ModuleName, feemarkettypes.ModuleName, + ibcclientstypes.ModuleName, erc20types.ModuleName, feemarkettypes.ModuleName, evmtypes.ModuleName, // NOTE: EVM BeginBlocker must come after FeeMarket BeginBlocker // TODO: remove no-ops? check if all are no-ops before removing @@ -631,7 +648,7 @@ func NewExampleApp( authtypes.ModuleName, banktypes.ModuleName, // Cosmos EVM EndBlockers - evmtypes.ModuleName, erc20types.ModuleName, feemarkettypes.ModuleName, + evmtypes.ModuleName, erc20types.ModuleName, feemarkettypes.ModuleName, ibcclientstypes.ModuleName, // no-ops ibcexported.ModuleName, ibctransfertypes.ModuleName, @@ -659,6 +676,7 @@ func NewExampleApp( evmtypes.ModuleName, feemarkettypes.ModuleName, erc20types.ModuleName, + ibcclientstypes.ModuleName, precisebanktypes.ModuleName, ibctransfertypes.ModuleName, diff --git a/go.mod b/go.mod index ec6781f79..8df9d6b77 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.23.8 require ( cosmossdk.io/api v0.9.2 cosmossdk.io/client/v2 v2.0.0-beta.7 + cosmossdk.io/collections v1.2.1 cosmossdk.io/core v0.11.3 cosmossdk.io/errors v1.0.2 cosmossdk.io/log v1.6.1 @@ -68,7 +69,6 @@ require ( cloud.google.com/go/iam v1.2.2 // indirect cloud.google.com/go/monitoring v1.21.2 // indirect cloud.google.com/go/storage v1.49.0 // indirect - cosmossdk.io/collections v1.2.1 // indirect cosmossdk.io/depinject v1.2.1 // indirect cosmossdk.io/schema v1.1.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect diff --git a/ibc/interfaces.go b/ibc/interfaces.go index b0198ac4d..da0b1ee08 100644 --- a/ibc/interfaces.go +++ b/ibc/interfaces.go @@ -4,6 +4,7 @@ import ( cmtbytes "github.com/cometbft/cometbft/libs/bytes" ibctypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" + ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -11,3 +12,19 @@ import ( type TransferKeeper interface { GetDenom(ctx sdk.Context, denomHash cmtbytes.HexBytes) (ibctypes.Denom, bool) } + +type ClientKeeper interface { + // VerifyMembership retrieves the light client module for the clientID and verifies the proof of the existence of a key-value pair at a specified height. + VerifyMembership(ctx sdk.Context, clientID string, height ibcexported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path ibcexported.Path, value []byte) error + // VerifyNonMembership retrieves the light client module for the clientID and verifies the absence of a given key at a specified height. + VerifyNonMembership(ctx sdk.Context, clientID string, height ibcexported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path ibcexported.Path) error + // UpdateClient updates the light client state with a new header + UpdateClient(ctx sdk.Context, clientID string, clientMsg ibcexported.ClientMessage) error + // GetClientStatus returns the status of a client given the client ID + GetClientStatus(ctx sdk.Context, clientID string) ibcexported.Status + // GetClientTimestampAtHeight returns the timestamp for a given height on the client + // given its client ID and height + GetClientTimestampAtHeight(ctx sdk.Context, clientID string, height ibcexported.Height) (uint64, error) + // GetClientState gets a particular client from the store + GetClientState(ctx sdk.Context, clientID string) (ibcexported.ClientState, bool) +} diff --git a/precompiles/ics02/README.md b/precompiles/ics02/README.md new file mode 100644 index 000000000..9bedc4daa --- /dev/null +++ b/precompiles/ics02/README.md @@ -0,0 +1,98 @@ +# ICS02 Precompile + +The ICS02 enavles native Cosmos SDK light clients to be accessed and managed through the standard [`ILightClient`](https://github.com/cosmos/solidity-ibc-eureka/blob/906ee5954e5817c408c0d86bee99197a655b1d95/contracts/interfaces/ILightClient.sol) interface in [`solidity-ibc-eureka`](https://github.com/cosmos/solidity-ibc-eureka). + +## Interface + +The precompile implements the standard `ILightClient` interface: + +### ILightClient Methods + +```solidity +/// @title Light Client Interface +/// @notice Interface for all IBC Eureka light clients to implement. +interface ILightClient { + /// @notice Updating the client and consensus state + /// @param updateMsg The encoded update message e.g., an SP1 proof. + /// @return The result of the update operation + function updateClient(bytes calldata updateMsg) external returns (ILightClientMsgs.UpdateResult); + + /// @notice Querying the membership of a key-value pair + /// @dev Notice that this message is not view, as it may update the client state for caching purposes. + /// @param msg_ The membership message + /// @return The unix timestamp of the verification height in the counterparty chain in seconds. + function verifyMembership(ILightClientMsgs.MsgVerifyMembership calldata msg_) external returns (uint256); + + /// @notice Querying the non-membership of a key + /// @dev Notice that this message is not view, as it may update the client state for caching purposes. + /// @param msg_ The membership message + /// @return The unix timestamp of the verification height in the counterparty chain in seconds. + function verifyNonMembership(ILightClientMsgs.MsgVerifyNonMembership calldata msg_) external returns (uint256); + + /// @notice Misbehaviour handling, moves the light client to the frozen state if misbehaviour is detected + /// @param misbehaviourMsg The misbehaviour message + function misbehaviour(bytes calldata misbehaviourMsg) external; + + /// @notice Upgrading the client + /// @param upgradeMsg The upgrade message + function upgradeClient(bytes calldata upgradeMsg) external; + + /// @notice Returns the client state. + /// @return The client state. + function getClientState() external view returns (bytes memory); +} +``` + +### ILightClientMsgs Structures + +```solidity +/// @title LightClient Messages +/// @notice Interface defining light client messages +interface ILightClientMsgs { + /// @notice Message for querying the membership of a key-value pair in the Merkle root at a given height. + /// @param proof The proof + /// @param proofHeight The height of the proof + /// @param path The path of the value in the Merkle tree + /// @param value The value in the Merkle tree + struct MsgVerifyMembership { + bytes proof; + IICS02ClientMsgs.Height proofHeight; + bytes[] path; + bytes value; + } + + /// @notice Message for querying the non-membership of a key in the Merkle root at a given height. + /// @param proof The proof + /// @param proofHeight The height of the proof + /// @param path The path of the value in the Merkle tree + struct MsgVerifyNonMembership { + bytes proof; + IICS02ClientMsgs.Height proofHeight; + bytes[] path; + } + + /// @notice The result of an update operation + enum UpdateResult { + /// The update was successful + Update, + /// A misbehaviour was detected + Misbehaviour, + /// Client is already up to date + NoOp + } +} +``` + +## Gas Costs + +The following gas costs are charged for each method: + + +| Method | Gas Cost | +|--------|----------| +| `updateClient` | 40,000 | +| `verifyMembership` | 15,000 | +| `verifyNonMembership` | 15,000 | +| `misbehaviour` | 40,000 | +| `upgradeClient` | 40,000 | +| `getClientState` | 4,000 | diff --git a/precompiles/ics02/abi.json b/precompiles/ics02/abi.json new file mode 100644 index 000000000..092520603 --- /dev/null +++ b/precompiles/ics02/abi.json @@ -0,0 +1,170 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ILightClient", + "sourceName": "solidity/precompiles/ics02/ILightClient.sol", + "abi": [ + { + "type": "function", + "name": "getClientState", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "misbehaviour", + "inputs": [ + { + "name": "misbehaviourMsg", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateClient", + "inputs": [ + { + "name": "updateMsg", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "enum ILightClientMsgs.UpdateResult" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeClient", + "inputs": [ + { + "name": "upgradeMsg", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "verifyMembership", + "inputs": [ + { + "name": "msg_", + "type": "tuple", + "internalType": "struct ILightClientMsgs.MsgVerifyMembership", + "components": [ + { + "name": "proof", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "proofHeight", + "type": "tuple", + "internalType": "struct IICS02ClientMsgs.Height", + "components": [ + { + "name": "revisionNumber", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "revisionHeight", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "name": "path", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "value", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "verifyNonMembership", + "inputs": [ + { + "name": "msg_", + "type": "tuple", + "internalType": "struct ILightClientMsgs.MsgVerifyNonMembership", + "components": [ + { + "name": "proof", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "proofHeight", + "type": "tuple", + "internalType": "struct IICS02ClientMsgs.Height", + "components": [ + { + "name": "revisionNumber", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "revisionHeight", + "type": "uint64", + "internalType": "uint64" + } + ] + }, + { + "name": "path", + "type": "bytes[]", + "internalType": "bytes[]" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/precompiles/ics02/light_client.go b/precompiles/ics02/light_client.go new file mode 100644 index 000000000..47ed7d1cb --- /dev/null +++ b/precompiles/ics02/light_client.go @@ -0,0 +1,162 @@ +package ics02 + +import ( + "embed" + "fmt" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/core/vm" + + ibcutils "github.com/cosmos/evm/ibc" + cmn "github.com/cosmos/evm/precompiles/common" + clientstypes "github.com/cosmos/evm/x/ibc/clients/types" + + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var _ vm.PrecompiledContract = (*Precompile)(nil) + +const ( + // abiPath defines the path to the LightClient precompile ABI JSON file. + abiPath = "abi.json" + + // TODO: These gas values are placeholders and should be determined through proper benchmarking. + + GasUpdateClient = 40_000 + GasVerifyMembership = 15_000 + GasVerifyNonMembership = 15_000 + GasMisbehaviour = 50_000 + GasGetClientState = 4_000 +) + +var ( + // Embed abi json file to the executable binary. Needed when importing as dependency. + // + //go:embed abi.json + f embed.FS + ABI abi.ABI +) + +func init() { + var err error + ABI, err = cmn.LoadABI(f, abiPath) + if err != nil { + panic(err) + } +} + +// LoadABI loads the ILightClient ABI from the embedded abi.json file +// for the ics02 precompile. +func LoadABI() (abi.ABI, error) { + return cmn.LoadABI(f, abiPath) +} + +// Precompile defines the precompiled contract for ICS02. +type Precompile struct { + cmn.Precompile + + abi.ABI + clientPrecompile clientstypes.ClientPrecompile + clientKeeper ibcutils.ClientKeeper + // BankKeeper is not used directly in the precompile but is needed for the balance handler. + BankKeeper cmn.BankKeeper +} + +// NewPrecompile creates a new Client Precompile instance as a +// PrecompiledContract interface. +func NewPrecompile( + clientPrecompile clientstypes.ClientPrecompile, + bankKeeper cmn.BankKeeper, + clientKeeper ibcutils.ClientKeeper, +) *Precompile { + return &Precompile{ + Precompile: cmn.Precompile{ + KvGasConfig: storetypes.GasConfig{}, + TransientKVGasConfig: storetypes.GasConfig{}, + ContractAddress: clientPrecompile.GetContractAddress(), + BalanceHandlerFactory: cmn.NewBalanceHandlerFactory(bankKeeper), + }, + ABI: ABI, + clientPrecompile: clientPrecompile, + clientKeeper: clientKeeper, + BankKeeper: bankKeeper, + } +} + +// RequiredGas calculates the contract gas used for the +func (p Precompile) RequiredGas(input []byte) uint64 { + // NOTE: This check avoid panicking when trying to decode the method ID + if len(input) < 4 { + return 0 + } + + methodID := input[:4] + method, err := p.MethodById(methodID) + if err != nil { + return 0 + } + + switch method.Name { + // ERC-20 transactions + case UpdateClientMethod: + return GasUpdateClient + case VerifyMembershipMethod: + return GasVerifyMembership + case VerifyNonMembershipMethod: + return GasVerifyNonMembership + case MisbehaviourMethod: + return GasMisbehaviour + // Read-only transactions + case GetClientStateMethod: + return GasGetClientState + default: + return 0 + } +} + +func (p Precompile) Run(evm *vm.EVM, contract *vm.Contract, readonly bool) ([]byte, error) { + return p.RunNativeAction(evm, contract, func(ctx sdk.Context) ([]byte, error) { + return p.Execute(ctx, evm.StateDB, contract, readonly) + }) +} + +func (p Precompile) Execute(ctx sdk.Context, stateDB vm.StateDB, contract *vm.Contract, readOnly bool) ([]byte, error) { + method, args, err := cmn.SetupABI(p.ABI, contract, readOnly, p.IsTransaction) + if err != nil { + return nil, err + } + + var bz []byte + + switch method.Name { + case UpdateClientMethod: + bz, err = p.UpdateClient(ctx, contract, stateDB, method, args) + case VerifyMembershipMethod: + bz, err = p.VerifyMembership(ctx, contract, stateDB, method, args) + case VerifyNonMembershipMethod: + bz, err = p.VerifyNonMembership(ctx, contract, stateDB, method, args) + case MisbehaviourMethod: + bz, err = p.Misbehaviour(ctx, contract, stateDB, method, args) + // queries: + case GetClientStateMethod: + bz, err = p.GetClientState(ctx, method, contract, args) + default: + return nil, fmt.Errorf(cmn.ErrUnknownMethod, method.Name) + } + + return bz, err +} + +// IsTransaction checks if the given method name corresponds to a transaction or query. +func (Precompile) IsTransaction(method *abi.Method) bool { + // GetClientStateMethod is the only query method. + return GetClientStateMethod != method.Name +} + +// Logger returns a precompile-specific logger. +func (p Precompile) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("evm extension", "clients") +} diff --git a/precompiles/ics02/query.go b/precompiles/ics02/query.go new file mode 100644 index 000000000..e19eae5c0 --- /dev/null +++ b/precompiles/ics02/query.go @@ -0,0 +1,44 @@ +package ics02 + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/core/vm" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + // GetClientStateMethod defines the get client state query method name. + GetClientStateMethod = "getClientState" +) + +// GetClientState returns the client state for the precompile's client ID. +func (p *Precompile) GetClientState( + ctx sdk.Context, + method *abi.Method, + _ *vm.Contract, + args []interface{}, +) ([]byte, error) { + clientID := p.clientPrecompile.ClientId + if err := ParseGetClientStateArgs(args); err != nil { + return nil, err + } + + clientState, found := p.clientKeeper.GetClientState(ctx, clientID) + if !found { + return nil, fmt.Errorf("client state not found for client ID %s", clientID) + } + + clientStateAny, err := codectypes.NewAnyWithValue(clientState) + if err != nil { + return nil, err + } + if len(clientStateAny.Value) == 0 { + return nil, fmt.Errorf("client state not found for client ID %s", clientID) + } + + return method.Outputs.Pack(clientStateAny.Value) +} diff --git a/precompiles/ics02/tx.go b/precompiles/ics02/tx.go new file mode 100644 index 000000000..0922aee81 --- /dev/null +++ b/precompiles/ics02/tx.go @@ -0,0 +1,169 @@ +package ics02 + +import ( + "fmt" + "math" + "math/big" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/core/vm" + + "github.com/cosmos/gogoproto/proto" + clienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" + commitmenttypesv2 "github.com/cosmos/ibc-go/v10/modules/core/23-commitment/types/v2" + ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + UpdateClientMethod = "updateClient" + VerifyMembershipMethod = "verifyMembership" + VerifyNonMembershipMethod = "verifyNonMembership" + MisbehaviourMethod = "misbehaviour" +) + +const ( + UpdateResultSuccess uint8 = 0 + UpdateResultMisbehaviour uint8 = 1 + UpdateResultNoop uint8 = 2 +) + +// UpdateClient updates the IBC client by passing the update message to the IBC client keeper. +func (p *Precompile) UpdateClient( + ctx sdk.Context, + _ *vm.Contract, + _ vm.StateDB, + method *abi.Method, + args []interface{}, +) ([]byte, error) { + clientID := p.clientPrecompile.ClientId + updateMsg, err := ParseUpdateClientArgs(args) + if err != nil { + return nil, err + } + + var anyUpdateMsg codectypes.Any + if err := proto.Unmarshal(updateMsg, &anyUpdateMsg); err != nil { + return nil, err + } + + clientMsg, err := clienttypes.UnpackClientMessage(&anyUpdateMsg) + if err != nil { + return nil, err + } + + if err := p.clientKeeper.UpdateClient(ctx, clientID, clientMsg); err != nil { + return nil, err + } + + if p.clientKeeper.GetClientStatus(ctx, clientID) == ibcexported.Frozen { + return method.Outputs.Pack(UpdateResultMisbehaviour) + } + + return method.Outputs.Pack(UpdateResultSuccess) +} + +// VerifyMembership verifies a membership proof by passing it to the IBC client keeper. +func (p *Precompile) VerifyMembership( + ctx sdk.Context, + _ *vm.Contract, + _ vm.StateDB, + method *abi.Method, + args []interface{}, +) ([]byte, error) { + verifyMsg, err := ParseVerifyMembershipArgs(args) + if err != nil { + return nil, err + } + + clientID := p.clientPrecompile.ClientId + proofHeight := clienttypes.NewHeight(verifyMsg.ProofHeight.RevisionNumber, verifyMsg.ProofHeight.RevisionHeight) + path := commitmenttypesv2.NewMerklePath(verifyMsg.Path...) + + if err := p.clientKeeper.VerifyMembership(ctx, clientID, proofHeight, 0, 0, verifyMsg.Proof, path, verifyMsg.Value); err != nil { + return nil, err + } + + timestampNano, err := p.clientKeeper.GetClientTimestampAtHeight(ctx, clientID, proofHeight) + if err != nil { + return nil, err + } + // Convert nanoseconds to seconds without overflow. + if timestampNano > math.MaxInt64 { + return nil, fmt.Errorf("timestamp in nanoseconds exceeds int64 max value") + } + timestampSeconds := time.Unix(0, int64(timestampNano)).Unix() + + return method.Outputs.Pack(big.NewInt(timestampSeconds)) +} + +func (p *Precompile) VerifyNonMembership( + ctx sdk.Context, + _ *vm.Contract, + _ vm.StateDB, + method *abi.Method, + args []interface{}, +) ([]byte, error) { + verifyMsg, err := ParseVerifyNonMembershipArgs(args) + if err != nil { + return nil, err + } + + clientID := p.clientPrecompile.ClientId + proofHeight := clienttypes.NewHeight(verifyMsg.ProofHeight.RevisionNumber, verifyMsg.ProofHeight.RevisionHeight) + path := commitmenttypesv2.NewMerklePath(verifyMsg.Path...) + + if err := p.clientKeeper.VerifyNonMembership(ctx, clientID, proofHeight, 0, 0, verifyMsg.Proof, path); err != nil { + return nil, err + } + + timestampNano, err := p.clientKeeper.GetClientTimestampAtHeight(ctx, clientID, proofHeight) + if err != nil { + return nil, err + } + // Convert nanoseconds to seconds without overflow. + if timestampNano > math.MaxInt64 { + return nil, fmt.Errorf("timestamp in nanoseconds exceeds int64 max value") + } + timestampSeconds := time.Unix(0, int64(timestampNano)).Unix() + + return method.Outputs.Pack(big.NewInt(timestampSeconds)) +} + +// Misbehaviour submits a misbehaviour update to the IBC client keeper. +func (p *Precompile) Misbehaviour( + ctx sdk.Context, + _ *vm.Contract, + _ vm.StateDB, + method *abi.Method, + args []interface{}, +) ([]byte, error) { + clientID := p.clientPrecompile.ClientId + updateMsg, err := ParseMisbehaviourArgs(args) + if err != nil { + return nil, err + } + + var anyUpdateMsg codectypes.Any + if err := proto.Unmarshal(updateMsg, &anyUpdateMsg); err != nil { + return nil, err + } + + clientMsg, err := clienttypes.UnpackClientMessage(&anyUpdateMsg) + if err != nil { + return nil, err + } + + if err := p.clientKeeper.UpdateClient(ctx, clientID, clientMsg); err != nil { + return nil, err + } + + if p.clientKeeper.GetClientStatus(ctx, clientID) != ibcexported.Frozen { + return nil, fmt.Errorf("client %s not frozen after misbehaviour update", clientID) + } + + return method.Outputs.Pack(true) +} diff --git a/precompiles/ics02/types.go b/precompiles/ics02/types.go new file mode 100644 index 000000000..4d0aff357 --- /dev/null +++ b/precompiles/ics02/types.go @@ -0,0 +1,78 @@ +package ics02 + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/accounts/abi" + + cmn "github.com/cosmos/evm/precompiles/common" +) + +// ILightClientMsgsMsgVerifyMembership is a low-level Go binding around ILightClientMsgs.MsgVerifyMembership +type ILightClientMsgsMsgVerifyMembership struct { + Proof []byte + ProofHeight IICS02ClientMsgsHeight + Path [][]byte + Value []byte +} + +// ILightClientMsgsMsgVerifyNonMembership is a low-level Go binding around ILightClientMsgs.MsgVerifyNonMembership +type ILightClientMsgsMsgVerifyNonMembership struct { + Proof []byte + ProofHeight IICS02ClientMsgsHeight + Path [][]byte +} + +// IICS02ClientMsgsHeight is a low-level Go binding around ICS02ClientMsgs.Height +type IICS02ClientMsgsHeight struct { + RevisionNumber uint64 + RevisionHeight uint64 +} + +// ParseGetClientStateArgs parses the arguments for the GetClientState method. +func ParseGetClientStateArgs(args []interface{}) error { + if len(args) != 0 { + return fmt.Errorf(cmn.ErrInvalidNumberOfArgs, 0, len(args)) + } + return nil +} + +// ParseUpdateClientArgs parses the arguments for the UpdateClient method. +func ParseUpdateClientArgs(args []interface{}) ([]byte, error) { + if len(args) != 1 { + return nil, fmt.Errorf(cmn.ErrInvalidNumberOfArgs, 1, len(args)) + } + + updateBytes, ok := args[0].([]byte) + if !ok { + return nil, fmt.Errorf("invalid update client bytes: %v", args[0]) + } + return updateBytes, nil +} + +// ParseVerifyMembershipArgs parses the arguments for the VerifyMembership method. +func ParseVerifyMembershipArgs(args []interface{}) (*ILightClientMsgsMsgVerifyMembership, error) { + if len(args) != 1 { + return nil, fmt.Errorf(cmn.ErrInvalidNumberOfArgs, 1, len(args)) + } + + msg := *abi.ConvertType(args[0], new(ILightClientMsgsMsgVerifyMembership)).(*ILightClientMsgsMsgVerifyMembership) + + return &msg, nil +} + +// ParseVerifyNonMembershipArgs parses the arguments for the VerifyNonMembership method. +func ParseVerifyNonMembershipArgs(args []interface{}) (*ILightClientMsgsMsgVerifyNonMembership, error) { + if len(args) != 1 { + return nil, fmt.Errorf(cmn.ErrInvalidNumberOfArgs, 1, len(args)) + } + + msg := *abi.ConvertType(args[0], new(ILightClientMsgsMsgVerifyNonMembership)).(*ILightClientMsgsMsgVerifyNonMembership) + + return &msg, nil +} + +// ParseMisbehaviourArgs parses the arguments for the Misbehaviour method. +func ParseMisbehaviourArgs(args []interface{}) ([]byte, error) { + return ParseUpdateClientArgs(args) +} diff --git a/precompiles/ics20/types.go b/precompiles/ics20/types.go index 56b45331a..62b992adc 100644 --- a/precompiles/ics20/types.go +++ b/precompiles/ics20/types.go @@ -239,5 +239,5 @@ func safeCopyInputs(method *abi.Method, args []interface{}, pageRequest *PageReq } }() err = method.Inputs.Copy(pageRequest, args) - return + return err } diff --git a/proto/cosmos/evm/erc20/v1/erc20.proto b/proto/cosmos/evm/erc20/v1/erc20.proto index d7cd29d2d..235fc53b4 100644 --- a/proto/cosmos/evm/erc20/v1/erc20.proto +++ b/proto/cosmos/evm/erc20/v1/erc20.proto @@ -17,8 +17,9 @@ enum Owner { OWNER_EXTERNAL = 2; } -// TokenPair defines an instance that records a pairing (mapping) consisting of a native -// Cosmos Coin and an ERC20 token address. The "pair" does not imply an asset swap exchange. +// TokenPair defines an instance that records a pairing (mapping) consisting of +// a native Cosmos Coin and an ERC20 token address. The "pair" does not imply an +// asset swap exchange. message TokenPair { option (gogoproto.equal) = true; // erc20_address is the hex address of ERC20 contract token diff --git a/proto/cosmos/evm/erc20/v1/query.proto b/proto/cosmos/evm/erc20/v1/query.proto index a23a6832c..3358813df 100644 --- a/proto/cosmos/evm/erc20/v1/query.proto +++ b/proto/cosmos/evm/erc20/v1/query.proto @@ -20,7 +20,8 @@ service Query { // TokenPair retrieves a registered token pair (mapping) rpc TokenPair(QueryTokenPairRequest) returns (QueryTokenPairResponse) { - option (google.api.http).get = "/cosmos/evm/erc20/v1/token_pairs/{token=**}"; + option (google.api.http).get = + "/cosmos/evm/erc20/v1/token_pairs/{token=**}"; } // Params retrieves the erc20 module params diff --git a/proto/cosmos/evm/ibc/clients/v1/query.proto b/proto/cosmos/evm/ibc/clients/v1/query.proto new file mode 100644 index 000000000..8b8f2e1e9 --- /dev/null +++ b/proto/cosmos/evm/ibc/clients/v1/query.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; +package cosmos.evm.ibc.clients.v1; + +import "amino/amino.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/evm/ibc/clients/v1/types.proto"; +import "cosmos/query/v1/query.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/evm/x/ibc/clients/types"; + +// Query defines the gRPC querier service. +service Query { + // ClientPrecompile returns the registered client precompile for a given + // client. + rpc ClientPrecompile(QueryClientPrecompileRequest) + returns (QueryClientPrecompileResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = + "/cosmos/evm/ibc/clients/v1/client_precompile/{client}"; + } + + // ClientPrecompiles returns all the ClientPrecompile values. + rpc ClientPrecompiles(QueryClientPrecompilesRequest) + returns (QueryClientPrecompilesResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = + "/cosmos/evm/ibc/clients/v1/client_precompiles"; + } + + // Params returns the module parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/evm/ibc/clients/v1/params"; + } +} + +// QueryClientPrecompileRequest is the request type for the +// Query/ClientPrecompile RPC +message QueryClientPrecompileRequest { + // client can be either the ibc client identifier or the hex contract address + // of the precompile + string client = 1; +} + +// QueryClientPrecompileResponse is the response type for the +// Query/ClientPrecompile RPC +message QueryClientPrecompileResponse { + // precompile returns the info about a registered client precompile for the + // ibc clients module + ClientPrecompile precompile = 1; +} + +// QueryClientPrecompilesRequest is the request type for the +// Query/ClientPrecompiles RPC +message QueryClientPrecompilesRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryClientPrecompilesResponse is the response type for the +// Query/ClientPrecompiles RPC +message QueryClientPrecompilesResponse { + // precompiles is a slice of registered client precompiles for the ibc clients + // module + repeated ClientPrecompile precompiles = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} diff --git a/proto/cosmos/evm/ibc/clients/v1/tx.proto b/proto/cosmos/evm/ibc/clients/v1/tx.proto new file mode 100644 index 000000000..7c1b4cfa4 --- /dev/null +++ b/proto/cosmos/evm/ibc/clients/v1/tx.proto @@ -0,0 +1,59 @@ +syntax = "proto3"; +package cosmos.evm.ibc.clients.v1; + +import "amino/amino.proto"; +import "cosmos/evm/ibc/clients/v1/types.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/evm/x/ibc/clients/types"; + +// Msg defines the module Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // RegisterClientPrecompile registers a client precompile mapping. + rpc RegisterClientPrecompile(MsgRegisterClientPrecompile) + returns (MsgRegisterClientPrecompileResponse); + + // UpdateParams updates the module parameters. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgRegisterClientPrecompile defines the Msg/RegisterClientPrecompile request +// type. +message MsgRegisterClientPrecompile { + option (cosmos.msg.v1.signer) = "sender"; + option (amino.name) = "cosmos/evm/x/ibc/clients/MsgRegisterClientPrecompile"; + + // sender is the message sender. + string sender = 1; + // client_id defines the ibc client id to be mapped to + string client_id = 2; + // address is the hex address of the light client contract + string address = 3; +} + +// MsgRegisterClientPrecompileResponse defines the Msg/RegisterClientPrecompile +// response type. +message MsgRegisterClientPrecompileResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "cosmos/evm/x/ibc/clients/MsgUpdateParams"; + + // authority is the address that controls the module + // NOTE: Defaults to the governance module unless overwritten. + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // params defines the module parameters to update. + // NOTE: All parameters must be supplied. + Params params = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} diff --git a/proto/cosmos/evm/ibc/clients/v1/types.proto b/proto/cosmos/evm/ibc/clients/v1/types.proto new file mode 100644 index 000000000..55b670a19 --- /dev/null +++ b/proto/cosmos/evm/ibc/clients/v1/types.proto @@ -0,0 +1,33 @@ + +syntax = "proto3"; +package cosmos.evm.ibc.clients.v1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/evm/x/ibc/clients/types"; + +// Params defines the clients module params +message Params {} + +// ClientPrecompile defines an instance that records a pairing (mapping) +// consisting of a native light client and a contract address. +message ClientPrecompile { + // client_id defines the ibc client id to be mapped to + string client_id = 1; + // address is the hex address of the light client contract + string address = 2; + // enabled defines the token mapping enable status + bool enabled = 3; +} + +// GenesisState is the state that must be provided at genesis. +message GenesisState { + // client_precompiles is a slice of the registered client precompiles + repeated ClientPrecompile client_precompiles = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + + // params defines all the parameters of the module. + Params params = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} diff --git a/proto/cosmos/evm/vm/v1/evm.proto b/proto/cosmos/evm/vm/v1/evm.proto index ea22da1f0..dfdc5dacb 100644 --- a/proto/cosmos/evm/vm/v1/evm.proto +++ b/proto/cosmos/evm/vm/v1/evm.proto @@ -39,9 +39,7 @@ message Params { ExtendedDenomOptions extended_denom_options = 11; } -message ExtendedDenomOptions { - string extended_denom = 1; -} +message ExtendedDenomOptions { string extended_denom = 1; } // AccessControl defines the permission policy of the EVM // for creating and calling contracts diff --git a/proto/cosmos/evm/vm/v1/query.proto b/proto/cosmos/evm/vm/v1/query.proto index 1bc327611..bdaad05ae 100644 --- a/proto/cosmos/evm/vm/v1/query.proto +++ b/proto/cosmos/evm/vm/v1/query.proto @@ -355,7 +355,9 @@ message QueryTraceCallRequest { // gas_cap defines the default gas cap to be used uint64 gas_cap = 2; // proposer_address of the requested block in hex format - bytes proposer_address = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + bytes proposer_address = 3 + [ (gogoproto.casttype) = + "github.com/cosmos/cosmos-sdk/types.ConsAddress" ]; // trace_config holds extra parameters to trace functions. TraceConfig trace_config = 4; // block_number of requested transaction @@ -363,7 +365,8 @@ message QueryTraceCallRequest { // block_hash of requested transaction string block_hash = 6; // block_time of requested transaction - google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp block_time = 7 + [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; // chain_id is the the eip155 chain id parsed from the requested block header int64 chain_id = 8; } diff --git a/proto/cosmos/evm/vm/v1/tx.proto b/proto/cosmos/evm/vm/v1/tx.proto index 7ac870f9a..96d195bfc 100644 --- a/proto/cosmos/evm/vm/v1/tx.proto +++ b/proto/cosmos/evm/vm/v1/tx.proto @@ -71,7 +71,8 @@ message MsgEthereumTxResponse { string vm_error = 4; // gas_used specifies how much gas was consumed by the transaction uint64 gas_used = 5; - // max_used_gas specifies the gas consumed by the transaction, not including refunds + // max_used_gas specifies the gas consumed by the transaction, not including + // refunds uint64 max_used_gas = 6; // include the block hash for json-rpc to use bytes block_hash = 7; diff --git a/x/ibc/clients/keeper/dynamic_precompiles.go b/x/ibc/clients/keeper/dynamic_precompiles.go new file mode 100644 index 000000000..851b55f5c --- /dev/null +++ b/x/ibc/clients/keeper/dynamic_precompiles.go @@ -0,0 +1,115 @@ +package keeper + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" + + "github.com/cosmos/evm/precompiles/ics02" + "github.com/cosmos/evm/x/ibc/clients/types" + "github.com/cosmos/evm/x/vm/statedb" + + "cosmossdk.io/collections" + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k Keeper) GetClientPrecompileInstance(ctx sdk.Context, address common.Address) (vm.PrecompiledContract, bool, error) { + precompile, err := k.AddressPrecompilesMap.Get(ctx, address.Bytes()) + if err != nil { + if errorsmod.IsOf(err, collections.ErrNotFound) { + return nil, false, nil + } + return nil, false, err + } + if !precompile.Enabled { + return nil, false, errorsmod.Wrapf(types.ErrPrecompileDisabled, "precompile at address %s is disabled", address.String()) + } + + return ics02.NewPrecompile(precompile, k.bankKeeper, k.clientKeeper), true, nil +} + +// createNewPrecompile creates and stores a new client precompile mapping. +func (k Keeper) createNewPrecompile(ctx sdk.Context, clientID string, address common.Address) (types.ClientPrecompile, error) { + if err := k.validateNewPrecompile(ctx, clientID, address); err != nil { + return types.ClientPrecompile{}, err + } + + precompile := types.ClientPrecompile{ + ClientId: clientID, + Address: address.Hex(), + Enabled: true, + } + + if err := k.ClientPrecompilesMap.Set(ctx, clientID, precompile); err != nil { + return types.ClientPrecompile{}, err + } + if err := k.AddressPrecompilesMap.Set(ctx, address.Bytes(), precompile); err != nil { + return types.ClientPrecompile{}, err + } + if err := k.registerClientCodeHash(ctx, address); err != nil { + return types.ClientPrecompile{}, err + } + + return precompile, nil +} + +// registerClientCodeHash sets the codehash for the client precompile account in the EVM. +func (k Keeper) registerClientCodeHash(ctx sdk.Context, address common.Address) error { + var ( + bytecode = common.FromHex(types.SolidityLightClientBytecode) + codeHash = crypto.Keccak256(bytecode) + ) + // check if code was already stored + code := k.evmKeeper.GetCode(ctx, common.Hash(codeHash)) + if len(code) != 0 { + return fmt.Errorf("code already registered for client precompile at address %s", address.String()) + } + + k.evmKeeper.SetCode(ctx, codeHash, bytecode) + + var ( + nonce uint64 + balance = common.U2560 + ) + // keep balance and nonce if account exists + if acc := k.evmKeeper.GetAccount(ctx, address); acc != nil { + nonce = acc.Nonce + balance = acc.Balance + } + + return k.evmKeeper.SetAccount(ctx, address, statedb.Account{ + CodeHash: codeHash, + Nonce: nonce, + Balance: balance, + }) +} + +// validateNewPrecompile validates that a new precompile can be created for the given client ID and address. +func (k Keeper) validateNewPrecompile(ctx sdk.Context, clientID string, address common.Address) error { + account := k.evmKeeper.GetAccount(ctx, address) + if account != nil && account.HasCodeHash() { + return errorsmod.Wrapf(types.ErrPrecompileAlreadyExists, "precompile already exists for address %s", address) + } + + isAddrMapped, err := k.AddressPrecompilesMap.Has(ctx, address.Bytes()) + if err != nil { + return err + } + if isAddrMapped { + return errorsmod.Wrapf(types.ErrPrecompileAlreadyExists, "precompile already mapped for address %s", address) + } + + isClientMapped, err := k.ClientPrecompilesMap.Has(ctx, clientID) + if err != nil { + return err + } + if isClientMapped { + return errorsmod.Wrapf(types.ErrPrecompileAlreadyExists, "precompile already mapped for client ID %s", clientID) + } + + return nil +} diff --git a/x/ibc/clients/keeper/genesis.go b/x/ibc/clients/keeper/genesis.go new file mode 100644 index 000000000..248fa46ab --- /dev/null +++ b/x/ibc/clients/keeper/genesis.go @@ -0,0 +1,55 @@ +package keeper + +import ( + "context" + + "github.com/ethereum/go-ethereum/common" + + "github.com/cosmos/evm/x/ibc/clients/types" +) + +// InitGenesis initializes the module state from a genesis state. +func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error { + if err := k.ParamsItem.Set(ctx, data.Params); err != nil { + return err + } + + for _, precompile := range data.ClientPrecompiles { + if !common.IsHexAddress(precompile.Address) { + return types.ErrInvalidPrecompileAddress.Wrapf("precompile address %s is not a valid hex address", precompile.Address) + } + + addressBz := common.HexToAddress(precompile.Address).Bytes() + + if err := k.ClientPrecompilesMap.Set(ctx, precompile.ClientId, precompile); err != nil { + return err + } + if err := k.AddressPrecompilesMap.Set(ctx, addressBz, precompile); err != nil { + return err + } + } + + return nil +} + +// ExportGenesis exports the module state to a genesis state. +func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { + params, err := k.ParamsItem.Get(ctx) + if err != nil { + return nil, err + } + + var precompiles []types.ClientPrecompile + if err := k.ClientPrecompilesMap.Walk(ctx, nil, func(address string, precompile types.ClientPrecompile) (bool, error) { + precompiles = append(precompiles, precompile) + + return false, nil + }); err != nil { + return nil, err + } + + return &types.GenesisState{ + Params: params, + ClientPrecompiles: precompiles, + }, nil +} diff --git a/x/ibc/clients/keeper/keeper.go b/x/ibc/clients/keeper/keeper.go new file mode 100644 index 000000000..b8c0dbaef --- /dev/null +++ b/x/ibc/clients/keeper/keeper.go @@ -0,0 +1,73 @@ +package keeper + +import ( + ibcutils "github.com/cosmos/evm/ibc" + "github.com/cosmos/evm/x/ibc/clients/types" + + "cosmossdk.io/collections" + "cosmossdk.io/core/address" + storetypes "cosmossdk.io/core/store" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type Keeper struct { + cdc codec.BinaryCodec + addressCodec address.Codec + + // authority is the address capable of executing a MsgUpdateParams and other authority-gated message. + authority sdk.AccAddress + + evmKeeper types.EVMKeeper + clientKeeper ibcutils.ClientKeeper + // bankKeeper is passed down to the precompiles + bankKeeper types.BankKeeper + + // state management + Schema collections.Schema + ParamsItem collections.Item[types.Params] + // Mapping from client ID to ClientPrecompile + ClientPrecompilesMap collections.Map[string, types.ClientPrecompile] + // Mapping from precompile address to ClientPrecompile + AddressPrecompilesMap collections.Map[[]byte, types.ClientPrecompile] +} + +// NewKeeper creates a new Keeper instance +func NewKeeper(cdc codec.BinaryCodec, addressCodec address.Codec, storeService storetypes.KVStoreService, authority sdk.AccAddress, evmKeeper types.EVMKeeper, clientKeeper ibcutils.ClientKeeper, bankKeeper types.BankKeeper) Keeper { + // ensure gov module account is set and is not nil + if err := sdk.VerifyAddressFormat(authority); err != nil { + panic(err) + } + if evmKeeper == nil { + panic("evmKeeper cannot be nil") + } + if clientKeeper == nil { + panic("clientKeeper cannot be nil") + } + if bankKeeper == nil { + panic("bankKeeper cannot be nil") + } + + sb := collections.NewSchemaBuilder(storeService) + k := Keeper{ + cdc: cdc, + addressCodec: addressCodec, + authority: authority, + evmKeeper: evmKeeper, + clientKeeper: clientKeeper, + bankKeeper: bankKeeper, + ParamsItem: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), + ClientPrecompilesMap: collections.NewMap(sb, types.ClientPrecompilesKey, "client_precompiles", collections.StringKey, codec.CollValue[types.ClientPrecompile](cdc)), + AddressPrecompilesMap: collections.NewMap(sb, types.PrecompilesKey, "address_precompiles", collections.BytesKey, codec.CollValue[types.ClientPrecompile](cdc)), + } + + schema, err := sb.Build() + if err != nil { + panic(err) + } + + k.Schema = schema + + return k +} diff --git a/x/ibc/clients/keeper/msg_server.go b/x/ibc/clients/keeper/msg_server.go new file mode 100644 index 000000000..43d0c0950 --- /dev/null +++ b/x/ibc/clients/keeper/msg_server.go @@ -0,0 +1,58 @@ +package keeper + +import ( + "context" + "strings" + + "github.com/ethereum/go-ethereum/common" + + "github.com/cosmos/evm/x/ibc/clients/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ types.MsgServer = (*Keeper)(nil) + +// IncrementCounter defines the handler for the MsgIncrementCounter message. +func (k Keeper) RegisterClientPrecompile(goCtx context.Context, msg *types.MsgRegisterClientPrecompile) (*types.MsgRegisterClientPrecompileResponse, error) { + if _, err := k.addressCodec.StringToBytes(msg.Sender); err != nil { + return nil, errortypes.ErrInvalidAddress.Wrapf("invalid sender address: %v", err) + } + + if !strings.EqualFold(msg.Sender, k.authority.String()) { + return nil, errortypes.ErrUnauthorized.Wrapf("unauthorized, authority does not match the module's authority: got %s, want %s", msg.Sender, k.authority.String()) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + + // Verify that the client ID is valid + if _, found := k.clientKeeper.GetClientState(ctx, msg.ClientId); !found { + return nil, types.ErrClientNotFound.Wrapf("client ID %s not found", msg.ClientId) + } + + // address is validated in ValidateBasic + address := common.HexToAddress(msg.Address) + if _, err := k.createNewPrecompile(ctx, msg.ClientId, address); err != nil { + return nil, err + } + + return &types.MsgRegisterClientPrecompileResponse{}, nil +} + +// UpdateParams params is defining the handler for the MsgUpdateParams message. +func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if _, err := k.addressCodec.StringToBytes(msg.Authority); err != nil { + return nil, errortypes.ErrInvalidAddress.Wrapf("invalid authority address: %v", err) + } + + if !strings.EqualFold(msg.Authority, k.authority.String()) { + return nil, errortypes.ErrUnauthorized.Wrapf("unauthorized, authority does not match the module's authority: got %s, want %s", msg.Authority, k.authority.String()) + } + + if err := k.ParamsItem.Set(ctx, msg.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/ibc/clients/keeper/query_server.go b/x/ibc/clients/keeper/query_server.go new file mode 100644 index 000000000..f6c47281d --- /dev/null +++ b/x/ibc/clients/keeper/query_server.go @@ -0,0 +1,71 @@ +package keeper + +import ( + "context" + "errors" + + "github.com/ethereum/go-ethereum/common" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/cosmos/evm/x/ibc/clients/types" + + "cosmossdk.io/collections" + errorsmod "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/types/query" +) + +var _ types.QueryServer = (*Keeper)(nil) + +// ClientPrecompile defines the handler for the Query/ClientPrecompile RPC method. +func (k Keeper) ClientPrecompile(ctx context.Context, req *types.QueryClientPrecompileRequest) (*types.QueryClientPrecompileResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if common.IsHexAddress(req.Client) { + addressBz := common.HexToAddress(req.Client).Bytes() + precompile, err := k.AddressPrecompilesMap.Get(ctx, addressBz) + if err != nil { + return nil, err + } + return &types.QueryClientPrecompileResponse{Precompile: &precompile}, nil + } + + precompile, err := k.ClientPrecompilesMap.Get(ctx, req.Client) + if err != nil { + return nil, errorsmod.Wrapf(err, "precompile for client ID %s not found", req.Client) + } + return &types.QueryClientPrecompileResponse{Precompile: &precompile}, nil +} + +// ClientPrecompiles defines the handler for the Query/ClientPrecompiles RPC method. +func (k Keeper) ClientPrecompiles(ctx context.Context, req *types.QueryClientPrecompilesRequest) (*types.QueryClientPrecompilesResponse, error) { + precompiles, pageRes, err := query.CollectionPaginate( + ctx, + k.ClientPrecompilesMap, + req.Pagination, + func(key string, value types.ClientPrecompile) (*types.ClientPrecompile, error) { + return &value, nil + }) + if err != nil { + return nil, err + } + + return &types.QueryClientPrecompilesResponse{Precompiles: precompiles, Pagination: pageRes}, nil +} + +// Params defines the handler for the Query/Params RPC method. +func (k Keeper) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + params, err := k.ParamsItem.Get(ctx) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return &types.QueryParamsResponse{Params: types.Params{}}, nil + } + + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryParamsResponse{Params: params}, nil +} diff --git a/x/ibc/clients/module.go b/x/ibc/clients/module.go new file mode 100644 index 000000000..7b6c3aa62 --- /dev/null +++ b/x/ibc/clients/module.go @@ -0,0 +1,146 @@ +package clients + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/grpc-ecosystem/grpc-gateway/runtime" + + "github.com/cosmos/evm/x/ibc/clients/keeper" + "github.com/cosmos/evm/x/ibc/clients/types" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "cosmossdk.io/core/appmodule" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" +) + +var ( + _ module.AppModule = (*AppModule)(nil) + _ module.AppModuleBasic = (*AppModule)(nil) + // _ module.AppModuleSimulation = (*AppModule)(nil) + _ module.HasGenesis = (*AppModule)(nil) + _ module.HasName = (*AppModule)(nil) + _ module.HasConsensusVersion = (*AppModule)(nil) + _ module.HasServices = (*AppModule)(nil) + // _ module.HasProposalMsgs = (*AppModule)(nil) + _ appmodule.AppModule = (*AppModule)(nil) +) + +// AppModule represents the AppModule for this module +type AppModule struct { + keeper *keeper.Keeper +} + +// NewAppModule creates a new 27-gmp module +func NewAppModule(k *keeper.Keeper) AppModule { + return AppModule{ + keeper: k, + } +} + +func NewAppModuleBasic(m AppModule) module.AppModuleBasic { + return module.CoreAppModuleBasicAdaptor(m.Name(), m) +} + +// Name implements AppModuleBasic interface +func (AppModule) Name() string { return types.ModuleName } + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (AppModule) IsAppModule() {} + +// RegisterLegacyAminoCodec implements AppModuleBasic interface +func (AppModule) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ics27 module. +func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +// RegisterInterfaces registers module concrete types into protobuf Any. +func (AppModule) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + +// ConsensusVersion implements AppModule/ConsensusVersion defining the current version of clients module. +func (AppModule) ConsensusVersion() uint64 { return 1 } + +// DefaultGenesis returns default genesis state as raw bytes for the clients module. +func (AppModule) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesis()) +} + +// RegisterServices registers module services. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), am.keeper) + types.RegisterQueryServer(cfg.QueryServer(), am.keeper) +} + +// ValidateGenesis performs genesis state validation for the clients module. +func (AppModule) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + var gs types.GenesisState + if err := cdc.UnmarshalJSON(bz, &gs); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + + return gs.Validate() +} + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return types.AutoCLIOptions() +} + +// InitGenesis performs genesis initialization for the clients module. It returns no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) { + var genesisState types.GenesisState + cdc.MustUnmarshalJSON(data, &genesisState) + err := am.keeper.InitGenesis(ctx, &genesisState) + if err != nil { + panic(fmt.Errorf("failed to initialize %s genesis state: %w", types.ModuleName, err)) + } +} + +// ExportGenesis returns the exported genesis state as raw bytes for the clients module. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + gs, err := am.keeper.ExportGenesis(ctx) + if err != nil { + panic(fmt.Errorf("failed to export %s genesis state: %w", types.ModuleName, err)) + } + + return cdc.MustMarshalJSON(gs) +} + +/* +// AppModuleSimulation functions + +// GenerateGenesisState creates a randomized GenState of the clients module. +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + simulation.RandomizedGenState(simState) +} + +// ProposalMsgs returns msgs used for governance proposals for simulations. +func (AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { + return simulation.ProposalMsgs() +} + +// RegisterStoreDecoder registers a decoder for clients module's types +func (AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { + sdr[types.StoreKey] = simulation.NewDecodeStore() +} + +// WeightedOperations returns the all the clients module operations with their respective weights. +func (AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { + return nil +} +*/ diff --git a/x/ibc/clients/types/autocli.go b/x/ibc/clients/types/autocli.go new file mode 100644 index 000000000..55994bf38 --- /dev/null +++ b/x/ibc/clients/types/autocli.go @@ -0,0 +1,49 @@ +package types + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: _Query_serviceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "ClientPrecompile", + Use: "get-precompile [client]", + Short: "Get the precompile information for a given client ID or light client precompile hex address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "client"}, + }, + }, + { + RpcMethod: "Params", + Use: "params", + Short: "Get the current module parameters", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: _Msg_serviceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "RegisterClientPrecompile", + // Use: "register-precompile [client_id] [address] [sender]", + // Short: "Register a new light client precompile address for a given IBC client ID. Requires authority permissions.", + // PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + // {ProtoField: "client_id"}, + // {ProtoField: "address"}, + // {ProtoField: "sender"}, + // }, + Skip: true, // This is a authority gated tx, so we skip it. + }, + { + RpcMethod: "UpdateParams", + Skip: true, // This is a authority gated tx, so we skip it. + }, + }, + }, + } +} diff --git a/x/ibc/clients/types/codec.go b/x/ibc/clients/types/codec.go new file mode 100644 index 000000000..409b6b363 --- /dev/null +++ b/x/ibc/clients/types/codec.go @@ -0,0 +1,18 @@ +package types + +import ( + types "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +// RegisterInterfaces registers the interfaces types with the interface registry. +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgUpdateParams{}, + &MsgRegisterClientPrecompile{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +// TODO: Does amino registration still need to be supported? diff --git a/x/ibc/clients/types/constants.go b/x/ibc/clients/types/constants.go new file mode 100644 index 000000000..d3a780deb --- /dev/null +++ b/x/ibc/clients/types/constants.go @@ -0,0 +1,5 @@ +package types + +const ( + SolidityLightClientBytecode = "0x60a034607357601f6107e238819003918201601f19168301916001600160401b03831184841017607757808492602094604052833981010312607357516001600160a01b0381168103607357608052604051610756908161008c8239608051818181608d015281816101e501526103e20152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe60806040526004361015610011575f80fd5b5f3560e01c80630bece3561461010e5780634d6d9ffb1461032f578063682ed5f014610123578063ddba65371461010e5763ef913a4b14610050575f80fd5b3461010a575f60031936011261010a57604051604060208201917fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b168352601481526100c1603482610612565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8351948593602085525180918160208701528686015e5f85828601015201168101030190f35b5f80fd5b3461010a5761011c36610459565b50506104aa565b3461010a57602060031936011261010a5760043567ffffffffffffffff811161010a578060040160a0600319833603011261010a5761017c60648301610176600161016e8386610508565b90501461055c565b82610508565b156103025761018e81610195926105c1565b3691610680565b60208151910120604051907f7795820c000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156102f7575f916102c3575b5061024f9160848261022b61018e9415156106e4565b6040516020810191825260208152610244604082610612565b5190209401906105c1565b6020815191012003610265576020604051428152f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420636f6d6d69746d656e7400000000000000000000000000006044820152fd5b90506020813d6020116102ef575b816102de60209383610612565b8101031261010a575161024f610215565b3d91506102d1565b6040513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b3461010a57602060031936011261010a5760043567ffffffffffffffff811161010a57806004016080600319833603011261010a57606461038092019061037b600161016e8484610508565b610508565b156103025761018e81610392926105c1565b60208151910120604051907f7795820c000000000000000000000000000000000000000000000000000000008252600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa80156102f7575f90610425575b61041b90156106e4565b6020604051428152f35b506020813d602011610451575b8161043f60209383610612565b8101031261010a5761041b9051610411565b3d9150610432565b90602060031983011261010a5760043567ffffffffffffffff811161010a578260238201121561010a5780600401359267ffffffffffffffff841161010a576024848301011161010a576024019190565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6e6f7420696d706c656d656e74656400000000000000000000000000000000006044820152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561010a570180359067ffffffffffffffff821161010a57602001918160051b3603831361010a57565b1561056357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6f6e6c7920737570706f72742073696e676c65207061746800000000000000006044820152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561010a570180359067ffffffffffffffff821161010a5760200191813603831361010a57565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761065357604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b92919267ffffffffffffffff821161065357604051916106c860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610612565b82948184528183011161010a578281602093845f960137010152565b156106eb57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f696e76616c6964207061746800000000000000000000000000000000000000006044820152fdfea164736f6c634300081c000a" +) diff --git a/x/ibc/clients/types/errors.go b/x/ibc/clients/types/errors.go new file mode 100644 index 000000000..a2e2c4623 --- /dev/null +++ b/x/ibc/clients/types/errors.go @@ -0,0 +1,13 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" +) + +// errors +var ( + ErrInvalidPrecompileAddress = errorsmod.Register(ModuleName, 2, "invalid precompile address") + ErrClientNotFound = errorsmod.Register(ModuleName, 3, "client not found") + ErrPrecompileAlreadyExists = errorsmod.Register(ModuleName, 4, "precompile already exists") + ErrPrecompileDisabled = errorsmod.Register(ModuleName, 5, "precompile disabled") +) diff --git a/x/ibc/clients/types/expected_keepers.go b/x/ibc/clients/types/expected_keepers.go new file mode 100644 index 000000000..8d06f74ab --- /dev/null +++ b/x/ibc/clients/types/expected_keepers.go @@ -0,0 +1,47 @@ +package types + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/tracing" + + "github.com/cosmos/evm/x/vm/statedb" + evmtypes "github.com/cosmos/evm/x/vm/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +) + +// EVMKeeper defines the expected EVM keeper interface used on this module and is passed down to the dynamic precompiles +type EVMKeeper interface { + GetParams(ctx sdk.Context) evmtypes.Params + GetAccountWithoutBalance(ctx sdk.Context, addr common.Address) *statedb.Account + EstimateGasInternal(c context.Context, req *evmtypes.EthCallRequest, fromType evmtypes.CallType) (*evmtypes.EstimateGasResponse, error) + ApplyMessage(ctx sdk.Context, msg core.Message, tracer *tracing.Hooks, commit, internal bool) (*evmtypes.MsgEthereumTxResponse, error) + DeleteAccount(ctx sdk.Context, addr common.Address) error + IsAvailableStaticPrecompile(params *evmtypes.Params, address common.Address) bool + CallEVM(ctx sdk.Context, abi abi.ABI, from, contract common.Address, commit bool, gasCap *big.Int, method string, args ...interface{}) (*evmtypes.MsgEthereumTxResponse, error) + CallEVMWithData(ctx sdk.Context, from common.Address, contract *common.Address, data []byte, commit bool, gasCap *big.Int) (*evmtypes.MsgEthereumTxResponse, error) + GetCode(ctx sdk.Context, hash common.Hash) []byte + SetCode(ctx sdk.Context, hash []byte, bytecode []byte) + SetAccount(ctx sdk.Context, address common.Address, account statedb.Account) error + GetAccount(ctx sdk.Context, address common.Address) *statedb.Account + IsContract(ctx sdk.Context, address common.Address) bool +} + +// BankKeeper is passed down to the dynamic precompiles +type BankKeeper interface { + IterateAccountBalances(ctx context.Context, account sdk.AccAddress, cb func(coin sdk.Coin) bool) + IterateTotalSupply(ctx context.Context, cb func(coin sdk.Coin) bool) + GetSupply(ctx context.Context, denom string) sdk.Coin + GetDenomMetaData(ctx context.Context, denom string) (banktypes.Metadata, bool) + SetDenomMetaData(ctx context.Context, denomMetaData banktypes.Metadata) + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error + SpendableCoin(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + BlockedAddr(addr sdk.AccAddress) bool +} diff --git a/x/ibc/clients/types/genesis.go b/x/ibc/clients/types/genesis.go new file mode 100644 index 000000000..6ee6fa745 --- /dev/null +++ b/x/ibc/clients/types/genesis.go @@ -0,0 +1,32 @@ +package types + +import ( + "github.com/ethereum/go-ethereum/common" + + clienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" + + errortypes "github.com/cosmos/cosmos-sdk/types/errors" +) + +// DefaultGenesis returns the default genesis state +func DefaultGenesis() *GenesisState { + return &GenesisState{ + Params: DefaultParams(), + } +} + +// Validate performs basic genesis state validation returning an error upon any +// failure. +func (gs GenesisState) Validate() error { + for _, precompile := range gs.ClientPrecompiles { + if !common.IsHexAddress(precompile.Address) { + return errortypes.ErrInvalidAddress.Wrapf("address '%s' is not a valid ethereum hex address", precompile.Address) + } + + if !clienttypes.IsValidClientID(precompile.ClientId) { + return clienttypes.ErrInvalidClient.Wrapf("client ID '%s' is invalid", precompile.ClientId) + } + } + + return gs.Params.Validate() +} diff --git a/x/ibc/clients/types/keys.go b/x/ibc/clients/types/keys.go new file mode 100644 index 000000000..f5533efe8 --- /dev/null +++ b/x/ibc/clients/types/keys.go @@ -0,0 +1,14 @@ +package types + +import "cosmossdk.io/collections" + +const ( + ModuleName = "precompileclients" + StoreKey = ModuleName +) + +var ( + ParamsKey = collections.NewPrefix(0) + ClientPrecompilesKey = collections.NewPrefix(1) + PrecompilesKey = collections.NewPrefix(2) +) diff --git a/x/ibc/clients/types/msg.go b/x/ibc/clients/types/msg.go new file mode 100644 index 000000000..df7febaea --- /dev/null +++ b/x/ibc/clients/types/msg.go @@ -0,0 +1,58 @@ +package types + +import ( + "github.com/ethereum/go-ethereum/common" + + clienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + errortypes "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + _ sdk.Msg = &MsgUpdateParams{} + _ sdk.Msg = &MsgRegisterClientPrecompile{} + _ sdk.HasValidateBasic = &MsgUpdateParams{} + _ sdk.HasValidateBasic = &MsgRegisterClientPrecompile{} +) + +// NewMsgUpdateParams creates a new MsgUpdateParams instance +func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: authority, + Params: params, + } +} + +// NewMsgRegisterClientPrecompile creates a new MsgRegisterClientPrecompile instance +func NewMsgRegisterClientPrecompile(sender, clientID, address string) *MsgRegisterClientPrecompile { + return &MsgRegisterClientPrecompile{ + ClientId: clientID, + Address: address, + Sender: sender, + } +} + +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("authority address '%s' is invalid: %v", m.Authority, err) + } + + return m.Params.Validate() +} + +func (m *MsgRegisterClientPrecompile) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Sender); err != nil { + return errortypes.ErrInvalidAddress.Wrapf("sender address '%s' is invalid: %v", m.Sender, err) + } + + if !common.IsHexAddress(m.Address) { + return errortypes.ErrInvalidAddress.Wrapf("address '%s' is not a valid ethereum hex address", m.Address) + } + + if !clienttypes.IsValidClientID(m.ClientId) { + return clienttypes.ErrInvalidClient.Wrapf("client ID '%s' is invalid", m.ClientId) + } + + return nil +} diff --git a/x/ibc/clients/types/params.go b/x/ibc/clients/types/params.go new file mode 100644 index 000000000..c81359ea9 --- /dev/null +++ b/x/ibc/clients/types/params.go @@ -0,0 +1,16 @@ +package types + +// NewParams creates a new Params instance. +func NewParams() Params { + return Params{} +} + +// DefaultParams returns a default set of parameters. +func DefaultParams() Params { + return NewParams() +} + +// Validate validates the set of params. +func (p Params) Validate() error { + return nil +} diff --git a/x/ibc/clients/types/precompile.go b/x/ibc/clients/types/precompile.go new file mode 100644 index 000000000..7f91e7310 --- /dev/null +++ b/x/ibc/clients/types/precompile.go @@ -0,0 +1,8 @@ +package types + +import "github.com/ethereum/go-ethereum/common" + +// GetAddress casts the hex string address of the ClientPrecompile to common.Address +func (p ClientPrecompile) GetContractAddress() common.Address { + return common.HexToAddress(p.Address) +} diff --git a/x/ibc/clients/types/query.pb.go b/x/ibc/clients/types/query.pb.go new file mode 100644 index 000000000..579374329 --- /dev/null +++ b/x/ibc/clients/types/query.pb.go @@ -0,0 +1,1418 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/evm/ibc/clients/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryClientPrecompileRequest is the request type for the +// Query/ClientPrecompile RPC +type QueryClientPrecompileRequest struct { + // client can be either the ibc client identifier or the hex contract address + // of the precompile + Client string `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"` +} + +func (m *QueryClientPrecompileRequest) Reset() { *m = QueryClientPrecompileRequest{} } +func (m *QueryClientPrecompileRequest) String() string { return proto.CompactTextString(m) } +func (*QueryClientPrecompileRequest) ProtoMessage() {} +func (*QueryClientPrecompileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cb8142ebdfe03aca, []int{0} +} +func (m *QueryClientPrecompileRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClientPrecompileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClientPrecompileRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryClientPrecompileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClientPrecompileRequest.Merge(m, src) +} +func (m *QueryClientPrecompileRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryClientPrecompileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClientPrecompileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClientPrecompileRequest proto.InternalMessageInfo + +func (m *QueryClientPrecompileRequest) GetClient() string { + if m != nil { + return m.Client + } + return "" +} + +// QueryClientPrecompileResponse is the response type for the +// Query/ClientPrecompile RPC +type QueryClientPrecompileResponse struct { + // precompile returns the info about a registered client precompile for the + // ibc clients module + Precompile *ClientPrecompile `protobuf:"bytes,1,opt,name=precompile,proto3" json:"precompile,omitempty"` +} + +func (m *QueryClientPrecompileResponse) Reset() { *m = QueryClientPrecompileResponse{} } +func (m *QueryClientPrecompileResponse) String() string { return proto.CompactTextString(m) } +func (*QueryClientPrecompileResponse) ProtoMessage() {} +func (*QueryClientPrecompileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb8142ebdfe03aca, []int{1} +} +func (m *QueryClientPrecompileResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClientPrecompileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClientPrecompileResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryClientPrecompileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClientPrecompileResponse.Merge(m, src) +} +func (m *QueryClientPrecompileResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryClientPrecompileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClientPrecompileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClientPrecompileResponse proto.InternalMessageInfo + +func (m *QueryClientPrecompileResponse) GetPrecompile() *ClientPrecompile { + if m != nil { + return m.Precompile + } + return nil +} + +// QueryClientPrecompilesRequest is the request type for the +// Query/ClientPrecompiles RPC +type QueryClientPrecompilesRequest struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryClientPrecompilesRequest) Reset() { *m = QueryClientPrecompilesRequest{} } +func (m *QueryClientPrecompilesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryClientPrecompilesRequest) ProtoMessage() {} +func (*QueryClientPrecompilesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cb8142ebdfe03aca, []int{2} +} +func (m *QueryClientPrecompilesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClientPrecompilesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClientPrecompilesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryClientPrecompilesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClientPrecompilesRequest.Merge(m, src) +} +func (m *QueryClientPrecompilesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryClientPrecompilesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClientPrecompilesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClientPrecompilesRequest proto.InternalMessageInfo + +func (m *QueryClientPrecompilesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryClientPrecompilesResponse is the response type for the +// Query/ClientPrecompiles RPC +type QueryClientPrecompilesResponse struct { + // precompiles is a slice of registered client precompiles for the ibc clients + // module + Precompiles []*ClientPrecompile `protobuf:"bytes,1,rep,name=precompiles,proto3" json:"precompiles,omitempty"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryClientPrecompilesResponse) Reset() { *m = QueryClientPrecompilesResponse{} } +func (m *QueryClientPrecompilesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryClientPrecompilesResponse) ProtoMessage() {} +func (*QueryClientPrecompilesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb8142ebdfe03aca, []int{3} +} +func (m *QueryClientPrecompilesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClientPrecompilesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClientPrecompilesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryClientPrecompilesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClientPrecompilesResponse.Merge(m, src) +} +func (m *QueryClientPrecompilesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryClientPrecompilesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClientPrecompilesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClientPrecompilesResponse proto.InternalMessageInfo + +func (m *QueryClientPrecompilesResponse) GetPrecompiles() []*ClientPrecompile { + if m != nil { + return m.Precompiles + } + return nil +} + +func (m *QueryClientPrecompilesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cb8142ebdfe03aca, []int{4} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb8142ebdfe03aca, []int{5} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*QueryClientPrecompileRequest)(nil), "cosmos.evm.ibc.clients.v1.QueryClientPrecompileRequest") + proto.RegisterType((*QueryClientPrecompileResponse)(nil), "cosmos.evm.ibc.clients.v1.QueryClientPrecompileResponse") + proto.RegisterType((*QueryClientPrecompilesRequest)(nil), "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesRequest") + proto.RegisterType((*QueryClientPrecompilesResponse)(nil), "cosmos.evm.ibc.clients.v1.QueryClientPrecompilesResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.evm.ibc.clients.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.evm.ibc.clients.v1.QueryParamsResponse") +} + +func init() { + proto.RegisterFile("cosmos/evm/ibc/clients/v1/query.proto", fileDescriptor_cb8142ebdfe03aca) +} + +var fileDescriptor_cb8142ebdfe03aca = []byte{ + // 536 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6b, 0xd4, 0x40, + 0x18, 0xc6, 0x77, 0xaa, 0x2e, 0xf4, 0xed, 0xc5, 0x8e, 0x45, 0x6a, 0xac, 0xb1, 0x8d, 0xf8, 0xa7, + 0x95, 0xce, 0xb0, 0x15, 0xad, 0x7a, 0xdc, 0x8a, 0x1e, 0x44, 0x58, 0xf7, 0xa8, 0x07, 0x99, 0x84, + 0x21, 0x0e, 0x6c, 0x32, 0xe9, 0x4e, 0x36, 0x58, 0xc4, 0x8b, 0x27, 0x8f, 0xa2, 0x5f, 0xc2, 0x9b, + 0x1e, 0xfd, 0x00, 0x1e, 0xea, 0xad, 0xe0, 0xc5, 0x93, 0xc8, 0xae, 0xe0, 0xd7, 0x90, 0x9d, 0x99, + 0xb8, 0x89, 0x25, 0xa9, 0xe9, 0xa5, 0x4c, 0x5f, 0xde, 0xe7, 0x79, 0x7f, 0xcf, 0x3b, 0xb3, 0x81, + 0xcb, 0x81, 0x54, 0x91, 0x54, 0x94, 0x67, 0x11, 0x15, 0x7e, 0x40, 0x83, 0x81, 0xe0, 0x71, 0xaa, + 0x68, 0xd6, 0xa1, 0xbb, 0x23, 0x3e, 0xdc, 0x23, 0xc9, 0x50, 0xa6, 0x12, 0x9f, 0x33, 0x6d, 0x84, + 0x67, 0x11, 0x11, 0x7e, 0x40, 0x6c, 0x1b, 0xc9, 0x3a, 0xce, 0x22, 0x8b, 0x44, 0x2c, 0xa9, 0xfe, + 0x6b, 0xba, 0x9d, 0x0d, 0x6b, 0xea, 0x33, 0xc5, 0x8d, 0x0d, 0xcd, 0x3a, 0x3e, 0x4f, 0x59, 0x87, + 0x26, 0x2c, 0x14, 0x31, 0x4b, 0x85, 0x8c, 0x6d, 0x6f, 0x0d, 0x40, 0xba, 0x97, 0x70, 0x65, 0xdb, + 0xce, 0xdb, 0xb6, 0xdc, 0xad, 0x48, 0xe7, 0x2c, 0x85, 0x32, 0x94, 0xfa, 0x48, 0xa7, 0x27, 0x5b, + 0x5d, 0x09, 0xa5, 0x0c, 0x07, 0x9c, 0xb2, 0x44, 0x50, 0x16, 0xc7, 0x32, 0xd5, 0x63, 0xad, 0xa1, + 0x77, 0x0b, 0x56, 0x1e, 0x4f, 0x2d, 0x76, 0xf4, 0xbc, 0xde, 0x90, 0x07, 0x32, 0x4a, 0xc4, 0x80, + 0xf7, 0xf9, 0xee, 0x88, 0xab, 0x14, 0x9f, 0x85, 0xb6, 0x41, 0x59, 0x46, 0xab, 0xe8, 0xda, 0x7c, + 0xdf, 0xfe, 0xe7, 0x0d, 0xe0, 0x42, 0x85, 0x4e, 0x25, 0x32, 0x56, 0x1c, 0x3f, 0x04, 0x48, 0xfe, + 0x56, 0xb5, 0x78, 0x61, 0xeb, 0x3a, 0xa9, 0xdc, 0x1f, 0x39, 0x64, 0x54, 0x90, 0x7b, 0x61, 0xc5, + 0x34, 0x95, 0x63, 0xde, 0x07, 0x98, 0xad, 0xd4, 0x4e, 0xbb, 0x92, 0x4f, 0x9b, 0xee, 0x9f, 0x98, + 0x45, 0xd9, 0xfd, 0x93, 0x1e, 0x0b, 0xf3, 0x88, 0xfd, 0x82, 0xd2, 0xfb, 0x8c, 0xc0, 0xad, 0x9a, + 0x64, 0x83, 0x3d, 0x82, 0x85, 0x19, 0x99, 0x5a, 0x46, 0xab, 0x27, 0x9a, 0x26, 0x2b, 0xea, 0xf1, + 0x83, 0x12, 0xf9, 0x9c, 0x26, 0xbf, 0x7a, 0x24, 0xb9, 0x61, 0x29, 0xa1, 0x2f, 0x01, 0xd6, 0xe4, + 0x3d, 0x36, 0x64, 0x51, 0xbe, 0x18, 0xef, 0x29, 0x9c, 0x29, 0x55, 0x6d, 0x88, 0x7b, 0xd0, 0x4e, + 0x74, 0xc5, 0xee, 0x6a, 0xad, 0x86, 0xdf, 0x48, 0xbb, 0xf3, 0xfb, 0x3f, 0x2e, 0xb6, 0x3e, 0xfc, + 0xfe, 0xb4, 0x81, 0xfa, 0x56, 0xbb, 0xf5, 0xf1, 0x24, 0x9c, 0xd2, 0xee, 0xf8, 0x2b, 0x82, 0xd3, + 0xff, 0xe6, 0xc4, 0xdb, 0x35, 0xa6, 0x75, 0x8f, 0xce, 0xb9, 0xdd, 0x5c, 0x68, 0x72, 0x79, 0xdd, + 0x37, 0x53, 0xc0, 0xd7, 0xdf, 0x7e, 0xbd, 0x9f, 0xdb, 0xc6, 0x37, 0x69, 0xf5, 0x8f, 0xca, 0x1c, + 0x9f, 0xcd, 0x6e, 0x82, 0xbe, 0x34, 0xa5, 0x57, 0xf8, 0x0b, 0x82, 0xc5, 0x43, 0xd7, 0x8f, 0x1b, + 0x33, 0xe5, 0x57, 0xe0, 0xdc, 0x39, 0x86, 0xd2, 0xc6, 0xb9, 0x3b, 0x8b, 0x43, 0xf1, 0x66, 0x93, + 0x38, 0x0a, 0xbf, 0x43, 0xd0, 0x36, 0x57, 0x87, 0x37, 0x8f, 0x22, 0x28, 0xbd, 0x19, 0x87, 0xfc, + 0x6f, 0xbb, 0xa5, 0x5c, 0xd7, 0x80, 0x97, 0xf0, 0x5a, 0x0d, 0xa0, 0x79, 0x31, 0xdd, 0x9d, 0xfd, + 0xb1, 0x8b, 0x0e, 0xc6, 0x2e, 0xfa, 0x39, 0x76, 0xd1, 0xdb, 0x89, 0xdb, 0x3a, 0x98, 0xb8, 0xad, + 0xef, 0x13, 0xb7, 0xf5, 0x64, 0x3d, 0x14, 0xe9, 0xf3, 0x91, 0x4f, 0x02, 0x19, 0x15, 0x6d, 0x5e, + 0x94, 0x8c, 0xf4, 0xa7, 0xd0, 0x6f, 0xeb, 0x4f, 0xd7, 0x8d, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x14, 0xbe, 0x5f, 0xb2, 0xb5, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // ClientPrecompile returns the registered client precompile for a given + // client. + ClientPrecompile(ctx context.Context, in *QueryClientPrecompileRequest, opts ...grpc.CallOption) (*QueryClientPrecompileResponse, error) + // ClientPrecompiles returns all the ClientPrecompile values. + ClientPrecompiles(ctx context.Context, in *QueryClientPrecompilesRequest, opts ...grpc.CallOption) (*QueryClientPrecompilesResponse, error) + // Params returns the module parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ClientPrecompile(ctx context.Context, in *QueryClientPrecompileRequest, opts ...grpc.CallOption) (*QueryClientPrecompileResponse, error) { + out := new(QueryClientPrecompileResponse) + err := c.cc.Invoke(ctx, "/cosmos.evm.ibc.clients.v1.Query/ClientPrecompile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ClientPrecompiles(ctx context.Context, in *QueryClientPrecompilesRequest, opts ...grpc.CallOption) (*QueryClientPrecompilesResponse, error) { + out := new(QueryClientPrecompilesResponse) + err := c.cc.Invoke(ctx, "/cosmos.evm.ibc.clients.v1.Query/ClientPrecompiles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.evm.ibc.clients.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // ClientPrecompile returns the registered client precompile for a given + // client. + ClientPrecompile(context.Context, *QueryClientPrecompileRequest) (*QueryClientPrecompileResponse, error) + // ClientPrecompiles returns all the ClientPrecompile values. + ClientPrecompiles(context.Context, *QueryClientPrecompilesRequest) (*QueryClientPrecompilesResponse, error) + // Params returns the module parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) ClientPrecompile(ctx context.Context, req *QueryClientPrecompileRequest) (*QueryClientPrecompileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClientPrecompile not implemented") +} +func (*UnimplementedQueryServer) ClientPrecompiles(ctx context.Context, req *QueryClientPrecompilesRequest) (*QueryClientPrecompilesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClientPrecompiles not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_ClientPrecompile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClientPrecompileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClientPrecompile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.evm.ibc.clients.v1.Query/ClientPrecompile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClientPrecompile(ctx, req.(*QueryClientPrecompileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ClientPrecompiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClientPrecompilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClientPrecompiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.evm.ibc.clients.v1.Query/ClientPrecompiles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClientPrecompiles(ctx, req.(*QueryClientPrecompilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.evm.ibc.clients.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.evm.ibc.clients.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ClientPrecompile", + Handler: _Query_ClientPrecompile_Handler, + }, + { + MethodName: "ClientPrecompiles", + Handler: _Query_ClientPrecompiles_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/evm/ibc/clients/v1/query.proto", +} + +func (m *QueryClientPrecompileRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryClientPrecompileRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClientPrecompileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Client) > 0 { + i -= len(m.Client) + copy(dAtA[i:], m.Client) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Client))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryClientPrecompileResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryClientPrecompileResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClientPrecompileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Precompile != nil { + { + size, err := m.Precompile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryClientPrecompilesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryClientPrecompilesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClientPrecompilesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryClientPrecompilesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryClientPrecompilesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClientPrecompilesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Precompiles) > 0 { + for iNdEx := len(m.Precompiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Precompiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryClientPrecompileRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Client) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryClientPrecompileResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Precompile != nil { + l = m.Precompile.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryClientPrecompilesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryClientPrecompilesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Precompiles) > 0 { + for _, e := range m.Precompiles { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryClientPrecompileRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryClientPrecompileRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClientPrecompileRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Client = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryClientPrecompileResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryClientPrecompileResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClientPrecompileResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Precompile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Precompile == nil { + m.Precompile = &ClientPrecompile{} + } + if err := m.Precompile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryClientPrecompilesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryClientPrecompilesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClientPrecompilesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryClientPrecompilesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryClientPrecompilesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClientPrecompilesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Precompiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Precompiles = append(m.Precompiles, &ClientPrecompile{}) + if err := m.Precompiles[len(m.Precompiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ibc/clients/types/query.pb.gw.go b/x/ibc/clients/types/query.pb.gw.go new file mode 100644 index 000000000..5d0e1269d --- /dev/null +++ b/x/ibc/clients/types/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cosmos/evm/ibc/clients/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_ClientPrecompile_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClientPrecompileRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["client"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "client") + } + + protoReq.Client, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client", err) + } + + msg, err := client.ClientPrecompile(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ClientPrecompile_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClientPrecompileRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["client"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "client") + } + + protoReq.Client, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client", err) + } + + msg, err := server.ClientPrecompile(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ClientPrecompiles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ClientPrecompiles_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClientPrecompilesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ClientPrecompiles_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ClientPrecompiles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ClientPrecompiles_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClientPrecompilesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ClientPrecompiles_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ClientPrecompiles(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_ClientPrecompile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ClientPrecompile_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClientPrecompile_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ClientPrecompiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ClientPrecompiles_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClientPrecompiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_ClientPrecompile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ClientPrecompile_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClientPrecompile_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ClientPrecompiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ClientPrecompiles_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClientPrecompiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_ClientPrecompile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"cosmos", "evm", "ibc", "clients", "v1", "client_precompile", "client"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ClientPrecompiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"cosmos", "evm", "ibc", "clients", "v1", "client_precompiles"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"cosmos", "evm", "ibc", "clients", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_ClientPrecompile_0 = runtime.ForwardResponseMessage + + forward_Query_ClientPrecompiles_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/ibc/clients/types/tx.pb.go b/x/ibc/clients/types/tx.pb.go new file mode 100644 index 000000000..f939e042b --- /dev/null +++ b/x/ibc/clients/types/tx.pb.go @@ -0,0 +1,1042 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/evm/ibc/clients/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgRegisterClientPrecompile defines the Msg/RegisterClientPrecompile request +// type. +type MsgRegisterClientPrecompile struct { + // sender is the message sender. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // client_id defines the ibc client id to be mapped to + ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // address is the hex address of the light client contract + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgRegisterClientPrecompile) Reset() { *m = MsgRegisterClientPrecompile{} } +func (m *MsgRegisterClientPrecompile) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterClientPrecompile) ProtoMessage() {} +func (*MsgRegisterClientPrecompile) Descriptor() ([]byte, []int) { + return fileDescriptor_5aa79fe5438ee54c, []int{0} +} +func (m *MsgRegisterClientPrecompile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterClientPrecompile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterClientPrecompile.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterClientPrecompile) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterClientPrecompile.Merge(m, src) +} +func (m *MsgRegisterClientPrecompile) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterClientPrecompile) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterClientPrecompile.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterClientPrecompile proto.InternalMessageInfo + +func (m *MsgRegisterClientPrecompile) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgRegisterClientPrecompile) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *MsgRegisterClientPrecompile) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// MsgRegisterClientPrecompileResponse defines the Msg/RegisterClientPrecompile +// response type. +type MsgRegisterClientPrecompileResponse struct { +} + +func (m *MsgRegisterClientPrecompileResponse) Reset() { *m = MsgRegisterClientPrecompileResponse{} } +func (m *MsgRegisterClientPrecompileResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterClientPrecompileResponse) ProtoMessage() {} +func (*MsgRegisterClientPrecompileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5aa79fe5438ee54c, []int{1} +} +func (m *MsgRegisterClientPrecompileResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterClientPrecompileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterClientPrecompileResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterClientPrecompileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterClientPrecompileResponse.Merge(m, src) +} +func (m *MsgRegisterClientPrecompileResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterClientPrecompileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterClientPrecompileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterClientPrecompileResponse proto.InternalMessageInfo + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module + // NOTE: Defaults to the governance module unless overwritten. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the module parameters to update. + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_5aa79fe5438ee54c, []int{2} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5aa79fe5438ee54c, []int{3} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterClientPrecompile)(nil), "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompile") + proto.RegisterType((*MsgRegisterClientPrecompileResponse)(nil), "cosmos.evm.ibc.clients.v1.MsgRegisterClientPrecompileResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.evm.ibc.clients.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.evm.ibc.clients.v1.MsgUpdateParamsResponse") +} + +func init() { + proto.RegisterFile("cosmos/evm/ibc/clients/v1/tx.proto", fileDescriptor_5aa79fe5438ee54c) +} + +var fileDescriptor_5aa79fe5438ee54c = []byte{ + // 466 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x41, 0x6b, 0xd4, 0x40, + 0x14, 0xde, 0x69, 0x71, 0x75, 0x47, 0x41, 0x0c, 0xc5, 0xa6, 0x29, 0x44, 0x8d, 0x14, 0xea, 0x82, + 0x19, 0xba, 0x4a, 0x0f, 0x15, 0x04, 0xb7, 0xbd, 0x78, 0x58, 0x28, 0x11, 0x2f, 0x5e, 0x4a, 0x36, + 0x19, 0xa6, 0x03, 0x9d, 0x4c, 0x98, 0x37, 0x5d, 0xda, 0x9b, 0x78, 0xf4, 0xa4, 0xfe, 0x0a, 0x8f, + 0x8b, 0xf8, 0x23, 0x7a, 0xf0, 0x50, 0x3c, 0x79, 0x12, 0xd9, 0x3d, 0xec, 0xdf, 0x90, 0xcc, 0x4c, + 0xe8, 0xae, 0xb0, 0x41, 0x7a, 0x09, 0x99, 0xf7, 0x7d, 0xf3, 0xde, 0xf7, 0x7d, 0x8f, 0xc1, 0x51, + 0x26, 0x41, 0x48, 0x20, 0x74, 0x24, 0x08, 0x1f, 0x66, 0x24, 0x3b, 0xe1, 0xb4, 0xd0, 0x40, 0x46, + 0x3b, 0x44, 0x9f, 0xc5, 0xa5, 0x92, 0x5a, 0x7a, 0x1b, 0x96, 0x13, 0xd3, 0x91, 0x88, 0xf9, 0x30, + 0x8b, 0x1d, 0x27, 0x1e, 0xed, 0x04, 0xf7, 0x52, 0xc1, 0x0b, 0x49, 0xcc, 0xd7, 0xb2, 0x83, 0xad, + 0x86, 0x8e, 0xe7, 0x25, 0x05, 0x47, 0x5b, 0x77, 0x34, 0x01, 0xac, 0x82, 0x04, 0x30, 0x07, 0xb8, + 0x69, 0x47, 0xe6, 0x44, 0xdc, 0x68, 0x0b, 0xad, 0x31, 0xc9, 0xa4, 0xad, 0x57, 0x7f, 0xb6, 0x1a, + 0x7d, 0x43, 0x78, 0x73, 0x00, 0x2c, 0xa1, 0x8c, 0x83, 0xa6, 0x6a, 0xdf, 0xcc, 0x3b, 0x54, 0x34, + 0x93, 0xa2, 0xe4, 0x27, 0xd4, 0xbb, 0x8f, 0xdb, 0x40, 0x8b, 0x9c, 0x2a, 0x1f, 0x3d, 0x44, 0xdb, + 0x9d, 0xc4, 0x9d, 0xbc, 0x4d, 0xdc, 0xb1, 0xda, 0x8e, 0x78, 0xee, 0xaf, 0x18, 0xe8, 0x96, 0x2d, + 0xbc, 0xce, 0x3d, 0x1f, 0xdf, 0x4c, 0xf3, 0x5c, 0x51, 0x00, 0x7f, 0xd5, 0x40, 0xf5, 0x71, 0xef, + 0xe0, 0xc3, 0x6c, 0xdc, 0x75, 0x3d, 0x3e, 0xce, 0xc6, 0xdd, 0xe7, 0x73, 0x7e, 0xcf, 0x16, 0x1c, + 0x37, 0x88, 0x8a, 0xb6, 0xf0, 0xe3, 0x06, 0x38, 0xa1, 0x50, 0xca, 0x02, 0x68, 0xf4, 0x03, 0xe1, + 0xbb, 0x03, 0x60, 0x6f, 0xcb, 0x3c, 0xd5, 0xf4, 0x30, 0x55, 0xa9, 0x00, 0x6f, 0x17, 0x77, 0xd2, + 0x53, 0x7d, 0x2c, 0x15, 0xd7, 0xe7, 0xd6, 0x52, 0xdf, 0xff, 0xf9, 0xfd, 0xe9, 0x9a, 0x8b, 0xea, + 0x95, 0xd5, 0xf9, 0x46, 0x2b, 0x5e, 0xb0, 0xe4, 0x8a, 0xea, 0x1d, 0xe0, 0x76, 0x69, 0x3a, 0x18, + 0xb3, 0xb7, 0x7b, 0x8f, 0xe2, 0xa5, 0x7b, 0x8d, 0xed, 0xa8, 0x7e, 0xe7, 0xe2, 0xf7, 0x83, 0xd6, + 0xd7, 0xd9, 0xb8, 0x8b, 0x12, 0x77, 0x77, 0xef, 0x45, 0x65, 0xff, 0xaa, 0x6b, 0x95, 0xc0, 0x76, + 0x53, 0x02, 0xf3, 0xd2, 0xa3, 0x0d, 0xbc, 0xfe, 0x4f, 0xa9, 0x76, 0xda, 0xfb, 0xbc, 0x82, 0x57, + 0x07, 0xc0, 0xbc, 0x2f, 0x08, 0xfb, 0x4b, 0x57, 0xb9, 0xdb, 0x20, 0xb9, 0x21, 0xce, 0xe0, 0xe5, + 0xf5, 0xee, 0xd5, 0xe2, 0xbc, 0x02, 0xdf, 0x59, 0x58, 0x41, 0xb7, 0xb9, 0xdf, 0x3c, 0x37, 0xe8, + 0xfd, 0x3f, 0xb7, 0x9e, 0x17, 0xdc, 0x78, 0x5f, 0x65, 0xde, 0xdf, 0xbf, 0x98, 0x84, 0xe8, 0x72, + 0x12, 0xa2, 0x3f, 0x93, 0x10, 0x7d, 0x9a, 0x86, 0xad, 0xcb, 0x69, 0xd8, 0xfa, 0x35, 0x0d, 0x5b, + 0xef, 0x9e, 0x30, 0xae, 0x8f, 0x4f, 0x87, 0x71, 0x26, 0x05, 0x59, 0x9a, 0xbe, 0x79, 0x6e, 0xc3, + 0xb6, 0x79, 0x25, 0xcf, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xea, 0xa2, 0x85, 0x62, 0xea, 0x03, + 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // RegisterClientPrecompile registers a client precompile mapping. + RegisterClientPrecompile(ctx context.Context, in *MsgRegisterClientPrecompile, opts ...grpc.CallOption) (*MsgRegisterClientPrecompileResponse, error) + // UpdateParams updates the module parameters. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) RegisterClientPrecompile(ctx context.Context, in *MsgRegisterClientPrecompile, opts ...grpc.CallOption) (*MsgRegisterClientPrecompileResponse, error) { + out := new(MsgRegisterClientPrecompileResponse) + err := c.cc.Invoke(ctx, "/cosmos.evm.ibc.clients.v1.Msg/RegisterClientPrecompile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.evm.ibc.clients.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // RegisterClientPrecompile registers a client precompile mapping. + RegisterClientPrecompile(context.Context, *MsgRegisterClientPrecompile) (*MsgRegisterClientPrecompileResponse, error) + // UpdateParams updates the module parameters. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) RegisterClientPrecompile(ctx context.Context, req *MsgRegisterClientPrecompile) (*MsgRegisterClientPrecompileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterClientPrecompile not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_RegisterClientPrecompile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterClientPrecompile) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterClientPrecompile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.evm.ibc.clients.v1.Msg/RegisterClientPrecompile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterClientPrecompile(ctx, req.(*MsgRegisterClientPrecompile)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.evm.ibc.clients.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.evm.ibc.clients.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterClientPrecompile", + Handler: _Msg_RegisterClientPrecompile_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/evm/ibc/clients/v1/tx.proto", +} + +func (m *MsgRegisterClientPrecompile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterClientPrecompile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterClientPrecompile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterClientPrecompileResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterClientPrecompileResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterClientPrecompileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterClientPrecompile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterClientPrecompileResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterClientPrecompile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterClientPrecompile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterClientPrecompile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterClientPrecompileResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterClientPrecompileResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterClientPrecompileResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ibc/clients/types/types.pb.go b/x/ibc/clients/types/types.pb.go new file mode 100644 index 000000000..37f040a24 --- /dev/null +++ b/x/ibc/clients/types/types.pb.go @@ -0,0 +1,783 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/evm/ibc/clients/v1/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the clients module params +type Params struct { +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_08249d9856f3d6be, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +// ClientPrecompile defines an instance that records a pairing (mapping) +// consisting of a native light client and a contract address. +type ClientPrecompile struct { + // client_id defines the ibc client id to be mapped to + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // address is the hex address of the light client contract + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // enabled defines the token mapping enable status + Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (m *ClientPrecompile) Reset() { *m = ClientPrecompile{} } +func (m *ClientPrecompile) String() string { return proto.CompactTextString(m) } +func (*ClientPrecompile) ProtoMessage() {} +func (*ClientPrecompile) Descriptor() ([]byte, []int) { + return fileDescriptor_08249d9856f3d6be, []int{1} +} +func (m *ClientPrecompile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClientPrecompile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClientPrecompile.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ClientPrecompile) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClientPrecompile.Merge(m, src) +} +func (m *ClientPrecompile) XXX_Size() int { + return m.Size() +} +func (m *ClientPrecompile) XXX_DiscardUnknown() { + xxx_messageInfo_ClientPrecompile.DiscardUnknown(m) +} + +var xxx_messageInfo_ClientPrecompile proto.InternalMessageInfo + +func (m *ClientPrecompile) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *ClientPrecompile) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *ClientPrecompile) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +// GenesisState is the state that must be provided at genesis. +type GenesisState struct { + // client_precompiles is a slice of the registered client precompiles + ClientPrecompiles []ClientPrecompile `protobuf:"bytes,1,rep,name=client_precompiles,json=clientPrecompiles,proto3" json:"client_precompiles"` + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_08249d9856f3d6be, []int{2} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetClientPrecompiles() []ClientPrecompile { + if m != nil { + return m.ClientPrecompiles + } + return nil +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*Params)(nil), "cosmos.evm.ibc.clients.v1.Params") + proto.RegisterType((*ClientPrecompile)(nil), "cosmos.evm.ibc.clients.v1.ClientPrecompile") + proto.RegisterType((*GenesisState)(nil), "cosmos.evm.ibc.clients.v1.GenesisState") +} + +func init() { + proto.RegisterFile("cosmos/evm/ibc/clients/v1/types.proto", fileDescriptor_08249d9856f3d6be) +} + +var fileDescriptor_08249d9856f3d6be = []byte{ + // 323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x4f, 0x2d, 0xcb, 0xd5, 0xcf, 0x4c, 0x4a, 0xd6, 0x4f, 0xce, 0xc9, 0x4c, 0xcd, + 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x84, 0x28, 0xd3, 0x4b, 0x2d, 0xcb, 0xd5, 0xcb, 0x4c, 0x4a, 0xd6, 0x83, 0x2a, + 0xd3, 0x2b, 0x33, 0x94, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0xd5, 0x52, + 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x11, 0x55, 0xe2, 0xe0, 0x62, 0x0b, + 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0x56, 0x4a, 0xe6, 0x12, 0x70, 0x06, 0x1b, 0x10, 0x50, 0x94, 0x9a, + 0x9c, 0x9f, 0x5b, 0x90, 0x99, 0x93, 0x2a, 0x24, 0xcd, 0xc5, 0x09, 0x31, 0x34, 0x3e, 0x33, 0x45, + 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x88, 0x03, 0x22, 0xe0, 0x99, 0x22, 0x24, 0xc1, 0xc5, 0x9e, + 0x98, 0x92, 0x52, 0x94, 0x5a, 0x5c, 0x2c, 0xc1, 0x04, 0x96, 0x82, 0x71, 0x41, 0x32, 0xa9, 0x79, + 0x89, 0x49, 0x39, 0xa9, 0x29, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x1c, 0x41, 0x30, 0xae, 0xd2, 0x6e, + 0x46, 0x2e, 0x1e, 0xf7, 0xd4, 0xbc, 0xd4, 0xe2, 0xcc, 0xe2, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0xa1, + 0x54, 0x2e, 0x21, 0xa8, 0x0d, 0x05, 0x70, 0x6b, 0x8b, 0x25, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, + 0xb4, 0xf5, 0x70, 0x7a, 0x50, 0x0f, 0xdd, 0xa9, 0x4e, 0x9c, 0x27, 0xee, 0xc9, 0x33, 0xac, 0x78, + 0xbe, 0x41, 0x8b, 0x31, 0x48, 0x30, 0x19, 0x4d, 0xb2, 0x58, 0xc8, 0x85, 0x8b, 0xad, 0x00, 0xec, + 0x4d, 0xb0, 0x53, 0xb9, 0x8d, 0x14, 0xf1, 0x18, 0x0d, 0x09, 0x0f, 0x64, 0x03, 0xa1, 0x7a, 0x9d, + 0x9c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, + 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x33, 0x3d, 0xb3, 0x24, + 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x29, 0xf2, 0x2a, 0x50, 0xa2, 0x0f, 0x1c, 0x77, + 0x49, 0x6c, 0xe0, 0x80, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x71, 0x92, 0x93, 0x2e, 0xe5, + 0x01, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ClientPrecompile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClientPrecompile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClientPrecompile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ClientPrecompiles) > 0 { + for iNdEx := len(m.ClientPrecompiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ClientPrecompiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ClientPrecompile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Enabled { + n += 2 + } + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ClientPrecompiles) > 0 { + for _, e := range m.ClientPrecompiles { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClientPrecompile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClientPrecompile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClientPrecompile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientPrecompiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientPrecompiles = append(m.ClientPrecompiles, ClientPrecompile{}) + if err := m.ClientPrecompiles[len(m.ClientPrecompiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/vm/keeper/keeper.go b/x/vm/keeper/keeper.go index 4a75eab92..76b61ceaf 100644 --- a/x/vm/keeper/keeper.go +++ b/x/vm/keeper/keeper.go @@ -61,6 +61,8 @@ type Keeper struct { feeMarketWrapper *wrappers.FeeMarketWrapper // optional erc20Keeper interface needed to instantiate erc20 precompiles erc20Keeper types.Erc20Keeper + // optional clientsKeeper interface needed to instantiate IBC client precompiles + clientsKeeper types.ClientsKeeper // consensusKeeper is used to get consensus params during query contexts. // This is needed as block.gasLimit is expected to be available in eth_call, which is routed through Cosmos SDK's // grpc query router. This query router builds a context WITHOUT consensus params, so we manually supply the context @@ -95,6 +97,7 @@ func NewKeeper( fmk types.FeeMarketKeeper, consensusKeeper types.ConsensusParamsKeeper, erc20Keeper types.Erc20Keeper, + clientsKeeper types.ClientsKeeper, evmChainID uint64, tracer string, ) *Keeper { @@ -130,6 +133,7 @@ func NewKeeper( tracer: tracer, consensusKeeper: consensusKeeper, erc20Keeper: erc20Keeper, + clientsKeeper: clientsKeeper, storeKeys: keys, } } diff --git a/x/vm/keeper/keeper_test.go b/x/vm/keeper/keeper_test.go index a2117754b..537d6f90f 100644 --- a/x/vm/keeper/keeper_test.go +++ b/x/vm/keeper/keeper_test.go @@ -96,6 +96,8 @@ func (suite *KeeperTestSuite) SetupTest() { suite.fmKeeper, suite.consensusKeeper, suite.erc20Keeper, + // TODO: mock clientsKeeper + nil, config.EighteenDecimalsChainID, "", ) diff --git a/x/vm/keeper/precompiles.go b/x/vm/keeper/precompiles.go index 2813afedb..942037358 100644 --- a/x/vm/keeper/precompiles.go +++ b/x/vm/keeper/precompiles.go @@ -14,6 +14,14 @@ type Precompiles struct { Addresses []common.Address } +// NewPrecompiles creates a Precompiles instance from a single precompiled contract. +func NewPrecompiles(address common.Address, precompile vm.PrecompiledContract) *Precompiles { + return &Precompiles{ + Map: map[common.Address]vm.PrecompiledContract{address: precompile}, + Addresses: []common.Address{address}, + } +} + // GetPrecompileInstance returns the address and instance of the static or dynamic precompile associated with the // given address, or return nil if not found. func (k *Keeper) GetPrecompileInstance( @@ -21,34 +29,33 @@ func (k *Keeper) GetPrecompileInstance( address common.Address, ) (*Precompiles, bool, error) { params := k.GetParams(ctx) + // Get the precompile from the static precompiles if precompile, found, err := k.GetStaticPrecompileInstance(¶ms, address); err != nil { return nil, false, err } else if found { - addressMap := make(map[common.Address]vm.PrecompiledContract) - addressMap[address] = precompile - return &Precompiles{ - Map: addressMap, - Addresses: []common.Address{precompile.Address()}, - }, found, nil + return NewPrecompiles(address, precompile), true, nil } // Since erc20Keeper is optional, we check if it is nil, in which case we just return that we didn't find the precompile - if k.erc20Keeper == nil { - return nil, false, nil + if k.erc20Keeper != nil { + if precompile, found, err := k.erc20Keeper.GetERC20PrecompileInstance(ctx, address); err != nil { + return nil, false, err + } else if found { + return NewPrecompiles(address, precompile), true, nil + } } - // Get the precompile from the dynamic precompiles - precompile, found, err := k.erc20Keeper.GetERC20PrecompileInstance(ctx, address) - if err != nil || !found { - return nil, false, err + // Similarly, clientsKeeper is also optional + if k.clientsKeeper != nil { + if precompile, found, err := k.clientsKeeper.GetClientPrecompileInstance(ctx, address); err != nil { + return nil, false, err + } else if found { + return NewPrecompiles(address, precompile), true, nil + } } - addressMap := make(map[common.Address]vm.PrecompiledContract) - addressMap[address] = precompile - return &Precompiles{ - Map: addressMap, - Addresses: []common.Address{precompile.Address()}, - }, found, nil + + return nil, false, nil } // GetPrecompilesCallHook returns a closure that can be used to instantiate the EVM with a specific diff --git a/x/vm/types/interfaces.go b/x/vm/types/interfaces.go index 75d358673..6d5d9e4ed 100644 --- a/x/vm/types/interfaces.go +++ b/x/vm/types/interfaces.go @@ -73,6 +73,11 @@ type Erc20Keeper interface { GetERC20PrecompileInstance(ctx sdk.Context, address common.Address) (contract vm.PrecompiledContract, found bool, err error) } +// ClientsKeeper defines the expected interface needed to instantiate IBC client precompiles. +type ClientsKeeper interface { + GetClientPrecompileInstance(ctx sdk.Context, address common.Address) (contract vm.PrecompiledContract, found bool, err error) +} + // EvmHooks event hooks for evm tx processing type EvmHooks interface { // Must be called after tx is processed successfully, if return an error, the whole transaction is reverted.