diff --git a/api/cardchain/featureflag/flag.pulsar.go b/api/cardchain/featureflag/flag.pulsar.go new file mode 100644 index 00000000..10b5e452 --- /dev/null +++ b/api/cardchain/featureflag/flag.pulsar.go @@ -0,0 +1,706 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package featureflag + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Flag protoreflect.MessageDescriptor + fd_Flag_Module protoreflect.FieldDescriptor + fd_Flag_Name protoreflect.FieldDescriptor + fd_Flag_Set protoreflect.FieldDescriptor +) + +func init() { + file_cardchain_featureflag_flag_proto_init() + md_Flag = File_cardchain_featureflag_flag_proto.Messages().ByName("Flag") + fd_Flag_Module = md_Flag.Fields().ByName("Module") + fd_Flag_Name = md_Flag.Fields().ByName("Name") + fd_Flag_Set = md_Flag.Fields().ByName("Set") +} + +var _ protoreflect.Message = (*fastReflection_Flag)(nil) + +type fastReflection_Flag Flag + +func (x *Flag) ProtoReflect() protoreflect.Message { + return (*fastReflection_Flag)(x) +} + +func (x *Flag) slowProtoReflect() protoreflect.Message { + mi := &file_cardchain_featureflag_flag_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_Flag_messageType fastReflection_Flag_messageType +var _ protoreflect.MessageType = fastReflection_Flag_messageType{} + +type fastReflection_Flag_messageType struct{} + +func (x fastReflection_Flag_messageType) Zero() protoreflect.Message { + return (*fastReflection_Flag)(nil) +} +func (x fastReflection_Flag_messageType) New() protoreflect.Message { + return new(fastReflection_Flag) +} +func (x fastReflection_Flag_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Flag +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Flag) Descriptor() protoreflect.MessageDescriptor { + return md_Flag +} + +// 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_Flag) Type() protoreflect.MessageType { + return _fastReflection_Flag_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Flag) New() protoreflect.Message { + return new(fastReflection_Flag) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Flag) Interface() protoreflect.ProtoMessage { + return (*Flag)(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_Flag) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Module != "" { + value := protoreflect.ValueOfString(x.Module) + if !f(fd_Flag_Module, value) { + return + } + } + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_Flag_Name, value) { + return + } + } + if x.Set_ != false { + value := protoreflect.ValueOfBool(x.Set_) + if !f(fd_Flag_Set, 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_Flag) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cardchain.featureflag.Flag.Module": + return x.Module != "" + case "cardchain.featureflag.Flag.Name": + return x.Name != "" + case "cardchain.featureflag.Flag.Set": + return x.Set_ != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.Flag")) + } + panic(fmt.Errorf("message cardchain.featureflag.Flag 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_Flag) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cardchain.featureflag.Flag.Module": + x.Module = "" + case "cardchain.featureflag.Flag.Name": + x.Name = "" + case "cardchain.featureflag.Flag.Set": + x.Set_ = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.Flag")) + } + panic(fmt.Errorf("message cardchain.featureflag.Flag 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_Flag) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cardchain.featureflag.Flag.Module": + value := x.Module + return protoreflect.ValueOfString(value) + case "cardchain.featureflag.Flag.Name": + value := x.Name + return protoreflect.ValueOfString(value) + case "cardchain.featureflag.Flag.Set": + value := x.Set_ + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.Flag")) + } + panic(fmt.Errorf("message cardchain.featureflag.Flag 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_Flag) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cardchain.featureflag.Flag.Module": + x.Module = value.Interface().(string) + case "cardchain.featureflag.Flag.Name": + x.Name = value.Interface().(string) + case "cardchain.featureflag.Flag.Set": + x.Set_ = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.Flag")) + } + panic(fmt.Errorf("message cardchain.featureflag.Flag 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_Flag) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cardchain.featureflag.Flag.Module": + panic(fmt.Errorf("field Module of message cardchain.featureflag.Flag is not mutable")) + case "cardchain.featureflag.Flag.Name": + panic(fmt.Errorf("field Name of message cardchain.featureflag.Flag is not mutable")) + case "cardchain.featureflag.Flag.Set": + panic(fmt.Errorf("field Set of message cardchain.featureflag.Flag is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.Flag")) + } + panic(fmt.Errorf("message cardchain.featureflag.Flag 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_Flag) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cardchain.featureflag.Flag.Module": + return protoreflect.ValueOfString("") + case "cardchain.featureflag.Flag.Name": + return protoreflect.ValueOfString("") + case "cardchain.featureflag.Flag.Set": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.Flag")) + } + panic(fmt.Errorf("message cardchain.featureflag.Flag 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_Flag) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cardchain.featureflag.Flag", 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_Flag) 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_Flag) 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_Flag) 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_Flag) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Flag) + 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.Module) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Set_ { + 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().(*Flag) + 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.Set_ { + i-- + if x.Set_ { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0x12 + } + if len(x.Module) > 0 { + i -= len(x.Module) + copy(dAtA[i:], x.Module) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Module))) + 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().(*Flag) + 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: Flag: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Flag: 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 Module", 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.Module = 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 Name", 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.Name = 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 Set_", 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.Set_ = 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cardchain/featureflag/flag.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) +) + +type Flag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Module string `protobuf:"bytes,1,opt,name=Module,proto3" json:"Module,omitempty"` + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + Set_ bool `protobuf:"varint,3,opt,name=Set,proto3" json:"Set,omitempty"` +} + +func (x *Flag) Reset() { + *x = Flag{} + if protoimpl.UnsafeEnabled { + mi := &file_cardchain_featureflag_flag_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Flag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Flag) ProtoMessage() {} + +// Deprecated: Use Flag.ProtoReflect.Descriptor instead. +func (*Flag) Descriptor() ([]byte, []int) { + return file_cardchain_featureflag_flag_proto_rawDescGZIP(), []int{0} +} + +func (x *Flag) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + +func (x *Flag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Flag) GetSet_() bool { + if x != nil { + return x.Set_ + } + return false +} + +var File_cardchain_featureflag_flag_proto protoreflect.FileDescriptor + +var file_cardchain_featureflag_flag_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x15, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x44, 0x0a, 0x04, 0x46, 0x6c, 0x61, + 0x67, 0x12, 0x16, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x53, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x53, 0x65, 0x74, 0x42, + 0xdd, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x09, 0x46, + 0x6c, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, + 0x43, 0x61, 0x72, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xa2, 0x02, 0x03, 0x43, + 0x46, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xca, 0x02, 0x15, 0x43, 0x61, 0x72, + 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, + 0x61, 0x67, 0xe2, 0x02, 0x21, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x3a, 0x3a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cardchain_featureflag_flag_proto_rawDescOnce sync.Once + file_cardchain_featureflag_flag_proto_rawDescData = file_cardchain_featureflag_flag_proto_rawDesc +) + +func file_cardchain_featureflag_flag_proto_rawDescGZIP() []byte { + file_cardchain_featureflag_flag_proto_rawDescOnce.Do(func() { + file_cardchain_featureflag_flag_proto_rawDescData = protoimpl.X.CompressGZIP(file_cardchain_featureflag_flag_proto_rawDescData) + }) + return file_cardchain_featureflag_flag_proto_rawDescData +} + +var file_cardchain_featureflag_flag_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cardchain_featureflag_flag_proto_goTypes = []interface{}{ + (*Flag)(nil), // 0: cardchain.featureflag.Flag +} +var file_cardchain_featureflag_flag_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cardchain_featureflag_flag_proto_init() } +func file_cardchain_featureflag_flag_proto_init() { + if File_cardchain_featureflag_flag_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cardchain_featureflag_flag_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Flag); 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_cardchain_featureflag_flag_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cardchain_featureflag_flag_proto_goTypes, + DependencyIndexes: file_cardchain_featureflag_flag_proto_depIdxs, + MessageInfos: file_cardchain_featureflag_flag_proto_msgTypes, + }.Build() + File_cardchain_featureflag_flag_proto = out.File + file_cardchain_featureflag_flag_proto_rawDesc = nil + file_cardchain_featureflag_flag_proto_goTypes = nil + file_cardchain_featureflag_flag_proto_depIdxs = nil +} diff --git a/api/cardchain/featureflag/genesis.pulsar.go b/api/cardchain/featureflag/genesis.pulsar.go new file mode 100644 index 00000000..2c435bb2 --- /dev/null +++ b/api/cardchain/featureflag/genesis.pulsar.go @@ -0,0 +1,952 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package featureflag + +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" + sort "sort" + sync "sync" +) + +var _ protoreflect.Map = (*_GenesisState_2_map)(nil) + +type _GenesisState_2_map struct { + m *map[string]*Flag +} + +func (x *_GenesisState_2_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_GenesisState_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_GenesisState_2_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_GenesisState_2_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_GenesisState_2_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Flag) + (*x.m)[concreteKey] = concreteValue +} + +func (x *_GenesisState_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if ok { + return protoreflect.ValueOfMessage(v.ProtoReflect()) + } + newValue := new(Flag) + (*x.m)[concreteKey] = newValue + return protoreflect.ValueOfMessage(newValue.ProtoReflect()) +} + +func (x *_GenesisState_2_map) NewValue() protoreflect.Value { + v := new(Flag) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_map) IsValid() bool { + return x.m != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_flags protoreflect.FieldDescriptor +) + +func init() { + file_cardchain_featureflag_genesis_proto_init() + md_GenesisState = File_cardchain_featureflag_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_flags = md_GenesisState.Fields().ByName("flags") +} + +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_cardchain_featureflag_genesis_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_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 x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } + if len(x.Flags) != 0 { + value := protoreflect.ValueOfMap(&_GenesisState_2_map{m: &x.Flags}) + if !f(fd_GenesisState_flags, 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 "cardchain.featureflag.GenesisState.params": + return x.Params != nil + case "cardchain.featureflag.GenesisState.flags": + return len(x.Flags) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.GenesisState")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.GenesisState.params": + x.Params = nil + case "cardchain.featureflag.GenesisState.flags": + x.Flags = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.GenesisState")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cardchain.featureflag.GenesisState.flags": + if len(x.Flags) == 0 { + return protoreflect.ValueOfMap(&_GenesisState_2_map{}) + } + mapValue := &_GenesisState_2_map{m: &x.Flags} + return protoreflect.ValueOfMap(mapValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.GenesisState")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + case "cardchain.featureflag.GenesisState.flags": + mv := value.Map() + cmv := mv.(*_GenesisState_2_map) + x.Flags = *cmv.m + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.GenesisState")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "cardchain.featureflag.GenesisState.flags": + if x.Flags == nil { + x.Flags = make(map[string]*Flag) + } + value := &_GenesisState_2_map{m: &x.Flags} + return protoreflect.ValueOfMap(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.GenesisState")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cardchain.featureflag.GenesisState.flags": + m := make(map[string]*Flag) + return protoreflect.ValueOfMap(&_GenesisState_2_map{m: &m}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.GenesisState")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 cardchain.featureflag.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 x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Flags) > 0 { + SiZeMaP := func(k string, v *Flag) { + l := 0 + if v != nil { + l = options.Size(v) + } + l += 1 + runtime.Sov(uint64(l)) + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Flags)) + for k := range x.Flags { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Flags[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Flags { + SiZeMaP(k, v) + } + } + } + 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 len(x.Flags) > 0 { + MaRsHaLmAp := func(k string, v *Flag) (protoiface.MarshalOutput, error) { + baseI := i + encoded, err := options.Marshal(v) + 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 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForFlags := make([]string, 0, len(x.Flags)) + for k := range x.Flags { + keysForFlags = append(keysForFlags, string(k)) + } + sort.Slice(keysForFlags, func(i, j int) bool { + return keysForFlags[i] < keysForFlags[j] + }) + for iNdEx := len(keysForFlags) - 1; iNdEx >= 0; iNdEx-- { + v := x.Flags[string(keysForFlags[iNdEx])] + out, err := MaRsHaLmAp(keysForFlags[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Flags { + v := x.Flags[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + 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().(*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 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 + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Flags", 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.Flags == nil { + x.Flags = make(map[string]*Flag) + } + var mapkey string + var mapvalue *Flag + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey 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++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen 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++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postmsgIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = &Flag{} + if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + 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) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Flags[mapkey] = mapvalue + 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: cardchain/featureflag/genesis.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) +) + +// GenesisState defines the featureflag module's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines all the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Flags map[string]*Flag `protobuf:"bytes,2,rep,name=flags,proto3" json:"flags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_cardchain_featureflag_genesis_proto_msgTypes[0] + 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_cardchain_featureflag_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *GenesisState) GetFlags() map[string]*Flag { + if x != nil { + return x.Flags + } + return nil +} + +var File_cardchain_featureflag_genesis_proto protoreflect.FileDescriptor + +var file_cardchain_featureflag_genesis_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 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, 0x1a, 0x22, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x63, 0x61, 0x72, 0x64, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, + 0x2f, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x0c, + 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, + 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x66, 0x6c, 0x61, 0x67, 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, 0x12, 0x44, + 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x1a, 0x55, 0x0a, 0x0a, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x46, 0x6c, 0x61, 0x67, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xe0, 0x01, 0x0a, 0x19, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x43, + 0x61, 0x72, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xa2, 0x02, 0x03, 0x43, 0x46, + 0x58, 0xaa, 0x02, 0x15, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xca, 0x02, 0x15, 0x43, 0x61, 0x72, 0x64, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, + 0x67, 0xe2, 0x02, 0x21, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x3a, 0x3a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cardchain_featureflag_genesis_proto_rawDescOnce sync.Once + file_cardchain_featureflag_genesis_proto_rawDescData = file_cardchain_featureflag_genesis_proto_rawDesc +) + +func file_cardchain_featureflag_genesis_proto_rawDescGZIP() []byte { + file_cardchain_featureflag_genesis_proto_rawDescOnce.Do(func() { + file_cardchain_featureflag_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cardchain_featureflag_genesis_proto_rawDescData) + }) + return file_cardchain_featureflag_genesis_proto_rawDescData +} + +var file_cardchain_featureflag_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cardchain_featureflag_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: cardchain.featureflag.GenesisState + nil, // 1: cardchain.featureflag.GenesisState.FlagsEntry + (*Params)(nil), // 2: cardchain.featureflag.Params + (*Flag)(nil), // 3: cardchain.featureflag.Flag +} +var file_cardchain_featureflag_genesis_proto_depIdxs = []int32{ + 2, // 0: cardchain.featureflag.GenesisState.params:type_name -> cardchain.featureflag.Params + 1, // 1: cardchain.featureflag.GenesisState.flags:type_name -> cardchain.featureflag.GenesisState.FlagsEntry + 3, // 2: cardchain.featureflag.GenesisState.FlagsEntry.value:type_name -> cardchain.featureflag.Flag + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_cardchain_featureflag_genesis_proto_init() } +func file_cardchain_featureflag_genesis_proto_init() { + if File_cardchain_featureflag_genesis_proto != nil { + return + } + file_cardchain_featureflag_params_proto_init() + file_cardchain_featureflag_flag_proto_init() + if !protoimpl.UnsafeEnabled { + file_cardchain_featureflag_genesis_proto_msgTypes[0].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_cardchain_featureflag_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cardchain_featureflag_genesis_proto_goTypes, + DependencyIndexes: file_cardchain_featureflag_genesis_proto_depIdxs, + MessageInfos: file_cardchain_featureflag_genesis_proto_msgTypes, + }.Build() + File_cardchain_featureflag_genesis_proto = out.File + file_cardchain_featureflag_genesis_proto_rawDesc = nil + file_cardchain_featureflag_genesis_proto_goTypes = nil + file_cardchain_featureflag_genesis_proto_depIdxs = nil +} diff --git a/api/cardchain/featureflag/module/module.pulsar.go b/api/cardchain/featureflag/module/module.pulsar.go new file mode 100644 index 00000000..947efc3f --- /dev/null +++ b/api/cardchain/featureflag/module/module.pulsar.go @@ -0,0 +1,583 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package module + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor + fd_Module_authority protoreflect.FieldDescriptor +) + +func init() { + file_cardchain_featureflag_module_module_proto_init() + md_Module = File_cardchain_featureflag_module_module_proto.Messages().ByName("Module") + fd_Module_authority = md_Module.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_cardchain_featureflag_module_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cardchain.featureflag.module.Module.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.module.Module")) + } + panic(fmt.Errorf("message cardchain.featureflag.module.Module does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cardchain.featureflag.module.Module.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.module.Module")) + } + panic(fmt.Errorf("message cardchain.featureflag.module.Module does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cardchain.featureflag.module.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.module.Module")) + } + panic(fmt.Errorf("message cardchain.featureflag.module.Module does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cardchain.featureflag.module.Module.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.module.Module")) + } + panic(fmt.Errorf("message cardchain.featureflag.module.Module does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cardchain.featureflag.module.Module.authority": + panic(fmt.Errorf("field authority of message cardchain.featureflag.module.Module is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.module.Module")) + } + panic(fmt.Errorf("message cardchain.featureflag.module.Module does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cardchain.featureflag.module.Module.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.module.Module")) + } + panic(fmt.Errorf("message cardchain.featureflag.module.Module does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cardchain.featureflag.module.Module", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Module) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cardchain/featureflag/module/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the config object for the module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority defines the custom module authority. If not set, defaults to the governance module. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_cardchain_featureflag_module_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_cardchain_featureflag_module_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +var File_cardchain_featureflag_module_module_proto protoreflect.FileDescriptor + +var file_cardchain_featureflag_module_module_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x63, 0x61, 0x72, + 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, + 0x61, 0x67, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x06, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x3a, 0x3c, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x36, 0x0a, 0x34, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, + 0x6c, 0x43, 0x61, 0x72, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, + 0x67, 0x42, 0x8a, 0x02, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2e, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x44, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x43, 0x61, 0x72, 0x64, 0x47, + 0x61, 0x6d, 0x65, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0xa2, 0x02, + 0x03, 0x43, 0x46, 0x4d, 0xaa, 0x02, 0x1c, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0xca, 0x02, 0x1c, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x5c, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0xe2, 0x02, 0x28, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, + 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cardchain_featureflag_module_module_proto_rawDescOnce sync.Once + file_cardchain_featureflag_module_module_proto_rawDescData = file_cardchain_featureflag_module_module_proto_rawDesc +) + +func file_cardchain_featureflag_module_module_proto_rawDescGZIP() []byte { + file_cardchain_featureflag_module_module_proto_rawDescOnce.Do(func() { + file_cardchain_featureflag_module_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cardchain_featureflag_module_module_proto_rawDescData) + }) + return file_cardchain_featureflag_module_module_proto_rawDescData +} + +var file_cardchain_featureflag_module_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cardchain_featureflag_module_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: cardchain.featureflag.module.Module +} +var file_cardchain_featureflag_module_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cardchain_featureflag_module_module_proto_init() } +func file_cardchain_featureflag_module_module_proto_init() { + if File_cardchain_featureflag_module_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cardchain_featureflag_module_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cardchain_featureflag_module_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cardchain_featureflag_module_module_proto_goTypes, + DependencyIndexes: file_cardchain_featureflag_module_module_proto_depIdxs, + MessageInfos: file_cardchain_featureflag_module_module_proto_msgTypes, + }.Build() + File_cardchain_featureflag_module_module_proto = out.File + file_cardchain_featureflag_module_module_proto_rawDesc = nil + file_cardchain_featureflag_module_module_proto_goTypes = nil + file_cardchain_featureflag_module_module_proto_depIdxs = nil +} diff --git a/api/cardchain/featureflag/params.pulsar.go b/api/cardchain/featureflag/params.pulsar.go new file mode 100644 index 00000000..fb51fec2 --- /dev/null +++ b/api/cardchain/featureflag/params.pulsar.go @@ -0,0 +1,504 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package featureflag + +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_cardchain_featureflag_params_proto_init() + md_Params = File_cardchain_featureflag_params_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_cardchain_featureflag_params_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: cardchain.featureflag.Params")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.Params")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.Params")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.Params")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.Params")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.Params")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 cardchain.featureflag.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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cardchain/featureflag/params.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 parameters for the module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_cardchain_featureflag_params_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_cardchain_featureflag_params_proto_rawDescGZIP(), []int{0} +} + +var File_cardchain_featureflag_params_proto protoreflect.FileDescriptor + +var file_cardchain_featureflag_params_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 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, 0x31, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x27, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, + 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xdf, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, + 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x43, 0x61, 0x72, 0x64, 0x47, 0x61, + 0x6d, 0x65, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x15, 0x43, + 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x66, 0x6c, 0x61, 0x67, 0xca, 0x02, 0x15, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xe2, 0x02, 0x21, 0x43, + 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x66, 0x6c, 0x61, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x16, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_cardchain_featureflag_params_proto_rawDescOnce sync.Once + file_cardchain_featureflag_params_proto_rawDescData = file_cardchain_featureflag_params_proto_rawDesc +) + +func file_cardchain_featureflag_params_proto_rawDescGZIP() []byte { + file_cardchain_featureflag_params_proto_rawDescOnce.Do(func() { + file_cardchain_featureflag_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_cardchain_featureflag_params_proto_rawDescData) + }) + return file_cardchain_featureflag_params_proto_rawDescData +} + +var file_cardchain_featureflag_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cardchain_featureflag_params_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: cardchain.featureflag.Params +} +var file_cardchain_featureflag_params_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cardchain_featureflag_params_proto_init() } +func file_cardchain_featureflag_params_proto_init() { + if File_cardchain_featureflag_params_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cardchain_featureflag_params_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 + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cardchain_featureflag_params_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cardchain_featureflag_params_proto_goTypes, + DependencyIndexes: file_cardchain_featureflag_params_proto_depIdxs, + MessageInfos: file_cardchain_featureflag_params_proto_msgTypes, + }.Build() + File_cardchain_featureflag_params_proto = out.File + file_cardchain_featureflag_params_proto_rawDesc = nil + file_cardchain_featureflag_params_proto_goTypes = nil + file_cardchain_featureflag_params_proto_depIdxs = nil +} diff --git a/api/cardchain/featureflag/query.pulsar.go b/api/cardchain/featureflag/query.pulsar.go new file mode 100644 index 00000000..3419d3a4 --- /dev/null +++ b/api/cardchain/featureflag/query.pulsar.go @@ -0,0 +1,1016 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package featureflag + +import ( + _ "cosmossdk.io/api/amino" + _ "cosmossdk.io/api/cosmos/base/query/v1beta1" + 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_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cardchain_featureflag_query_proto_init() + md_QueryParamsRequest = File_cardchain_featureflag_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_cardchain_featureflag_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_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: cardchain.featureflag.QueryParamsRequest")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.QueryParamsRequest")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.QueryParamsRequest")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.QueryParamsRequest")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.QueryParamsRequest")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.QueryParamsRequest")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 cardchain.featureflag.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_cardchain_featureflag_query_proto_init() + md_QueryParamsResponse = File_cardchain_featureflag_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_cardchain_featureflag_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_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 "cardchain.featureflag.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.QueryParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.QueryParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.QueryParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.QueryParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.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: cardchain.featureflag.QueryParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.QueryParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 cardchain.featureflag.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: cardchain/featureflag/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) +) + +// QueryParamsRequest is 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_cardchain_featureflag_query_proto_msgTypes[0] + 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_cardchain_featureflag_query_proto_rawDescGZIP(), []int{0} +} + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params holds all the parameters of this module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cardchain_featureflag_query_proto_msgTypes[1] + 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_cardchain_featureflag_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +var File_cardchain_featureflag_query_proto protoreflect.FileDescriptor + +var file_cardchain_featureflag_query_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 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, 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, 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, 0x22, 0x63, + 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x57, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 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, 0xa2, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x98, 0x01, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x44, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, + 0x43, 0x61, 0x72, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xde, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x61, + 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, + 0x6c, 0x61, 0x67, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x65, + 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x43, 0x61, 0x72, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x2f, + 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x61, + 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, + 0x6c, 0x61, 0x67, 0xa2, 0x02, 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x61, 0x72, 0x64, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, + 0x67, 0xca, 0x02, 0x15, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xe2, 0x02, 0x21, 0x43, 0x61, 0x72, 0x64, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, + 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, + 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cardchain_featureflag_query_proto_rawDescOnce sync.Once + file_cardchain_featureflag_query_proto_rawDescData = file_cardchain_featureflag_query_proto_rawDesc +) + +func file_cardchain_featureflag_query_proto_rawDescGZIP() []byte { + file_cardchain_featureflag_query_proto_rawDescOnce.Do(func() { + file_cardchain_featureflag_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cardchain_featureflag_query_proto_rawDescData) + }) + return file_cardchain_featureflag_query_proto_rawDescData +} + +var file_cardchain_featureflag_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cardchain_featureflag_query_proto_goTypes = []interface{}{ + (*QueryParamsRequest)(nil), // 0: cardchain.featureflag.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: cardchain.featureflag.QueryParamsResponse + (*Params)(nil), // 2: cardchain.featureflag.Params +} +var file_cardchain_featureflag_query_proto_depIdxs = []int32{ + 2, // 0: cardchain.featureflag.QueryParamsResponse.params:type_name -> cardchain.featureflag.Params + 0, // 1: cardchain.featureflag.Query.Params:input_type -> cardchain.featureflag.QueryParamsRequest + 1, // 2: cardchain.featureflag.Query.Params:output_type -> cardchain.featureflag.QueryParamsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] 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_cardchain_featureflag_query_proto_init() } +func file_cardchain_featureflag_query_proto_init() { + if File_cardchain_featureflag_query_proto != nil { + return + } + file_cardchain_featureflag_params_proto_init() + if !protoimpl.UnsafeEnabled { + file_cardchain_featureflag_query_proto_msgTypes[0].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_cardchain_featureflag_query_proto_msgTypes[1].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_cardchain_featureflag_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cardchain_featureflag_query_proto_goTypes, + DependencyIndexes: file_cardchain_featureflag_query_proto_depIdxs, + MessageInfos: file_cardchain_featureflag_query_proto_msgTypes, + }.Build() + File_cardchain_featureflag_query_proto = out.File + file_cardchain_featureflag_query_proto_rawDesc = nil + file_cardchain_featureflag_query_proto_goTypes = nil + file_cardchain_featureflag_query_proto_depIdxs = nil +} diff --git a/api/cardchain/featureflag/query_grpc.pb.go b/api/cardchain/featureflag/query_grpc.pb.go new file mode 100644 index 00000000..f7957337 --- /dev/null +++ b/api/cardchain/featureflag/query_grpc.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: cardchain/featureflag/query.proto + +package featureflag + +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_Params_FullMethodName = "/cardchain.featureflag.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 { + // Parameters queries the parameters of the module. + 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) 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 { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +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_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: "cardchain.featureflag.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cardchain/featureflag/query.proto", +} diff --git a/api/cardchain/featureflag/tx.pulsar.go b/api/cardchain/featureflag/tx.pulsar.go new file mode 100644 index 00000000..0cef5f49 --- /dev/null +++ b/api/cardchain/featureflag/tx.pulsar.go @@ -0,0 +1,1095 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package featureflag + +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_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_cardchain_featureflag_tx_proto_init() + md_MsgUpdateParams = File_cardchain_featureflag_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_cardchain_featureflag_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_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 "cardchain.featureflag.MsgUpdateParams.authority": + return x.Authority != "" + case "cardchain.featureflag.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.MsgUpdateParams")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.MsgUpdateParams.authority": + x.Authority = "" + case "cardchain.featureflag.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.MsgUpdateParams")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cardchain.featureflag.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.MsgUpdateParams")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "cardchain.featureflag.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.MsgUpdateParams")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "cardchain.featureflag.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message cardchain.featureflag.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.MsgUpdateParams")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 "cardchain.featureflag.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "cardchain.featureflag.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cardchain.featureflag.MsgUpdateParams")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 cardchain.featureflag.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_cardchain_featureflag_tx_proto_init() + md_MsgUpdateParamsResponse = File_cardchain_featureflag_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_cardchain_featureflag_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_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: cardchain.featureflag.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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: cardchain.featureflag.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cardchain.featureflag.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 cardchain.featureflag.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: cardchain/featureflag/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) +) + +// 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 (defaults to x/gov 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_cardchain_featureflag_tx_proto_msgTypes[0] + 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_cardchain_featureflag_tx_proto_rawDescGZIP(), []int{0} +} + +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_cardchain_featureflag_tx_proto_msgTypes[1] + 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_cardchain_featureflag_tx_proto_rawDescGZIP(), []int{1} +} + +var File_cardchain_featureflag_tx_proto protoreflect.FileDescriptor + +var file_cardchain_featureflag_tx_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x15, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 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, 0x1a, 0x22, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 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, 0x40, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 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, 0x3a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x27, 0x63, 0x61, 0x72, 0x64, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, + 0x61, 0x67, 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, 0x74, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x66, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2e, 0x2e, 0x63, + 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x66, 0x6c, 0x61, 0x67, 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, 0xdb, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x61, 0x72, 0x64, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, + 0x67, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x72, + 0x61, 0x6c, 0x43, 0x61, 0x72, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xa2, 0x02, + 0x03, 0x43, 0x46, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0xca, 0x02, 0x15, 0x43, + 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x66, 0x6c, 0x61, 0x67, 0xe2, 0x02, 0x21, 0x43, 0x61, 0x72, 0x64, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, 0x67, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x61, 0x72, 0x64, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x3a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x66, 0x6c, 0x61, + 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cardchain_featureflag_tx_proto_rawDescOnce sync.Once + file_cardchain_featureflag_tx_proto_rawDescData = file_cardchain_featureflag_tx_proto_rawDesc +) + +func file_cardchain_featureflag_tx_proto_rawDescGZIP() []byte { + file_cardchain_featureflag_tx_proto_rawDescOnce.Do(func() { + file_cardchain_featureflag_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cardchain_featureflag_tx_proto_rawDescData) + }) + return file_cardchain_featureflag_tx_proto_rawDescData +} + +var file_cardchain_featureflag_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cardchain_featureflag_tx_proto_goTypes = []interface{}{ + (*MsgUpdateParams)(nil), // 0: cardchain.featureflag.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: cardchain.featureflag.MsgUpdateParamsResponse + (*Params)(nil), // 2: cardchain.featureflag.Params +} +var file_cardchain_featureflag_tx_proto_depIdxs = []int32{ + 2, // 0: cardchain.featureflag.MsgUpdateParams.params:type_name -> cardchain.featureflag.Params + 0, // 1: cardchain.featureflag.Msg.UpdateParams:input_type -> cardchain.featureflag.MsgUpdateParams + 1, // 2: cardchain.featureflag.Msg.UpdateParams:output_type -> cardchain.featureflag.MsgUpdateParamsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] 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_cardchain_featureflag_tx_proto_init() } +func file_cardchain_featureflag_tx_proto_init() { + if File_cardchain_featureflag_tx_proto != nil { + return + } + file_cardchain_featureflag_params_proto_init() + if !protoimpl.UnsafeEnabled { + file_cardchain_featureflag_tx_proto_msgTypes[0].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_cardchain_featureflag_tx_proto_msgTypes[1].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_cardchain_featureflag_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cardchain_featureflag_tx_proto_goTypes, + DependencyIndexes: file_cardchain_featureflag_tx_proto_depIdxs, + MessageInfos: file_cardchain_featureflag_tx_proto_msgTypes, + }.Build() + File_cardchain_featureflag_tx_proto = out.File + file_cardchain_featureflag_tx_proto_rawDesc = nil + file_cardchain_featureflag_tx_proto_goTypes = nil + file_cardchain_featureflag_tx_proto_depIdxs = nil +} diff --git a/api/cardchain/featureflag/tx_grpc.pb.go b/api/cardchain/featureflag/tx_grpc.pb.go new file mode 100644 index 00000000..95442cac --- /dev/null +++ b/api/cardchain/featureflag/tx_grpc.pb.go @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: cardchain/featureflag/tx.proto + +package featureflag + +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_UpdateParams_FullMethodName = "/cardchain.featureflag.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 { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + 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) 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 { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +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_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: "cardchain.featureflag.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cardchain/featureflag/tx.proto", +} diff --git a/app/app.go b/app/app.go index 360ea174..ffadeaca 100644 --- a/app/app.go +++ b/app/app.go @@ -76,6 +76,8 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" cardchainmodulekeeper "github.com/DecentralCardGame/cardchain/x/cardchain/keeper" + featureflagmodulekeeper "github.com/DecentralCardGame/cardchain/x/featureflag/keeper" + // this line is used by starport scaffolding # stargate/app/moduleImport "github.com/DecentralCardGame/cardchain/docs" @@ -141,7 +143,8 @@ type App struct { ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedKeepers map[string]capabilitykeeper.ScopedKeeper - CardchainKeeper cardchainmodulekeeper.Keeper + CardchainKeeper cardchainmodulekeeper.Keeper + FeatureflagKeeper featureflagmodulekeeper.Keeper // this line is used by starport scaffolding # stargate/app/keeperDeclaration // simulation manager @@ -246,6 +249,7 @@ func New( &app.GroupKeeper, &app.CircuitBreakerKeeper, &app.CardchainKeeper, + &app.FeatureflagKeeper, // this line is used by starport scaffolding # stargate/app/keeperDefinition ); err != nil { panic(err) diff --git a/app/app_config.go b/app/app_config.go index 732d1738..fd75a098 100644 --- a/app/app_config.go +++ b/app/app_config.go @@ -54,8 +54,11 @@ import ( "google.golang.org/protobuf/types/known/durationpb" cardchainmodulev1 "github.com/DecentralCardGame/cardchain/api/cardchain/cardchain/module" + featureflagmodulev1 "github.com/DecentralCardGame/cardchain/api/cardchain/featureflag/module" _ "github.com/DecentralCardGame/cardchain/x/cardchain/module" // import for side-effects cardchainmoduletypes "github.com/DecentralCardGame/cardchain/x/cardchain/types" + _ "github.com/DecentralCardGame/cardchain/x/featureflag/module" // import for side-effects + featureflagmoduletypes "github.com/DecentralCardGame/cardchain/x/featureflag/types" // this line is used by starport scaffolding # stargate/app/moduleImport ) @@ -94,6 +97,7 @@ var ( circuittypes.ModuleName, // chain modules cardchainmoduletypes.ModuleName, + featureflagmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/initGenesis } @@ -119,6 +123,7 @@ var ( ibcfeetypes.ModuleName, // chain modules cardchainmoduletypes.ModuleName, + featureflagmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/beginBlockers } @@ -138,6 +143,7 @@ var ( ibcfeetypes.ModuleName, // chain modules cardchainmoduletypes.ModuleName, + featureflagmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/endBlockers } @@ -297,6 +303,10 @@ var ( Name: cardchainmoduletypes.ModuleName, Config: appconfig.WrapAny(&cardchainmodulev1.Module{}), }, + { + Name: featureflagmoduletypes.ModuleName, + Config: appconfig.WrapAny(&featureflagmodulev1.Module{}), + }, // this line is used by starport scaffolding # stargate/app/moduleConfig }, }) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 3bd41838..23ee980a 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -1 +1 @@ -{"id":"github.com/DecentralCardGame/cardchain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/DecentralCardGame/cardchain REST API","title":"HTTP API Console","contact":{"name":"github.com/DecentralCardGame/cardchain"},"version":"version not set"},"paths":{"/DecentralCardGame/cardchain/cardchain/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComDecentralCardGamecardchainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/DecentralCardGame/cardchain/cardchain/product_details":{"get":{"tags":["Query"],"operationId":"GithubComDecentralCardGamecardchainQuery_ProductDetailsAll","parameters":[{"type":"string","format":"byte","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","name":"pagination.key","in":"query"},{"type":"string","format":"uint64","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","name":"pagination.offset","in":"query"},{"type":"string","format":"uint64","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","name":"pagination.limit","in":"query"},{"type":"boolean","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.QueryAllProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/DecentralCardGame/cardchain/cardchain/product_details/{id}":{"get":{"tags":["Query"],"summary":"Queries a list of ProductDetails items.","operationId":"GithubComDecentralCardGamecardchainQuery_ProductDetails","parameters":[{"type":"string","format":"uint64","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.QueryGetProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/BoosterPackBuy":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_BoosterPackBuy","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackBuy"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackBuyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/BoosterPackOpen":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_BoosterPackOpen","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackOpen"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackOpenResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/BoosterPackTransfer":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_BoosterPackTransfer","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackTransfer"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackTransferResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardArtistChange":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardArtistChange","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtistChange"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtistChangeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardArtworkAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardArtworkAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtworkAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtworkAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardDonate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardDonate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardDonate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardDonateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardRaritySet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardRaritySet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardRaritySet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardRaritySetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardSaveContent":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardSaveContent","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSaveContent"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSaveContentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardSchemeBuy":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardSchemeBuy","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSchemeBuy"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSchemeBuyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardTransfer":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardTransfer","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardTransfer"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardTransferResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardVote":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardVote","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVote"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardVoteMulti":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardVoteMulti","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVoteMulti"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVoteMultiResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilDeregister":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilDeregister","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilDeregister"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilDeregisterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilRegister":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilRegister","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRegister"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRegisterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilResponseCommit":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilResponseCommit","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseCommit"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseCommitResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilResponseReveal":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilResponseReveal","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseReveal"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseRevealResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilRestart":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilRestart","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRestart"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRestartResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CreateProductDetails":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CreateProductDetails","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCreateProductDetails"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCreateProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/DeleteProductDetails":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_DeleteProductDetails","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgDeleteProductDetails"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgDeleteProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EarlyAccessInvite":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EarlyAccessInvite","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEarlyAccessInvite"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEarlyAccessInviteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EncounterClose":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EncounterClose","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterClose"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterCloseResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EncounterCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EncounterCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EncounterDo":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EncounterDo","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterDo"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterDoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchConfirm":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchConfirm","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchConfirm"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchConfirmResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchOpen":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchOpen","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchOpen"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchOpenResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchReport":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchReport","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReport"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReportResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchReporterAppoint":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchReporterAppoint","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReporterAppoint"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReporterAppointResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileAliasSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileAliasSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileAliasSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileAliasSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileBioSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileBioSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileBioSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileBioSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileCardSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileCardSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileCardSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileCardSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileWebsiteSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileWebsiteSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileWebsiteSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileWebsiteSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SellOfferBuy":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SellOfferBuy","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferBuy"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferBuyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SellOfferCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SellOfferCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SellOfferRemove":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SellOfferRemove","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferRemove"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferRemoveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetArtistSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetArtistSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtistSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtistSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetArtworkAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetArtworkAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtworkAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtworkAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetCardAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetCardAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetCardRemove":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetCardRemove","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardRemove"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardRemoveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetContributorAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetContributorAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetContributorRemove":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetContributorRemove","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorRemove"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorRemoveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetFinalize":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetFinalize","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetFinalize"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetFinalizeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetNameSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetNameSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetNameSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetNameSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetStoryAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetStoryAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetStoryWriterSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetStoryWriterSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryWriterSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryWriterSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/UpdateParams":{"post":{"tags":["Msg"],"summary":"UpdateParams defines a (governance) operation for updating the module\nparameters. The authority defaults to the x/gov module account.","operationId":"GithubComDecentralCardGamecardchainMsg_UpdateParams","parameters":[{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateParams"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/UpdateProductDetails":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_UpdateProductDetails","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateProductDetails"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/UserCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_UserCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUserCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUserCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ZealyConnect":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ZealyConnect","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgZealyConnect"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgZealyConnectResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cardchain.cardchain.CardRarity":{"type":"string","default":"common","enum":["common","uncommon","rare","exceptional","unique"]},"cardchain.cardchain.MsgBoosterPackBuy":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgBoosterPackBuyResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgBoosterPackOpen":{"type":"object","properties":{"boosterPackId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgBoosterPackOpenResponse":{"type":"object","properties":{"cardIds":{"type":"array","items":{"type":"string","format":"uint64"}}}},"cardchain.cardchain.MsgBoosterPackTransfer":{"type":"object","properties":{"boosterPackId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"receiver":{"type":"string"}}},"cardchain.cardchain.MsgBoosterPackTransferResponse":{"type":"object"},"cardchain.cardchain.MsgCardArtistChange":{"type":"object","properties":{"artist":{"type":"string"},"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCardArtistChangeResponse":{"type":"object"},"cardchain.cardchain.MsgCardArtworkAdd":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"fullArt":{"type":"boolean"},"image":{"type":"string","format":"byte"}}},"cardchain.cardchain.MsgCardArtworkAddResponse":{"type":"object"},"cardchain.cardchain.MsgCardDonate":{"type":"object","properties":{"amount":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCardDonateResponse":{"type":"object"},"cardchain.cardchain.MsgCardRaritySet":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"rarity":{"$ref":"#/definitions/cardchain.cardchain.CardRarity"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgCardRaritySetResponse":{"type":"object"},"cardchain.cardchain.MsgCardSaveContent":{"type":"object","properties":{"artist":{"type":"string"},"balanceAnchor":{"type":"boolean"},"cardId":{"type":"string","format":"uint64"},"content":{"type":"string","format":"byte"},"creator":{"type":"string"},"notes":{"type":"string"}}},"cardchain.cardchain.MsgCardSaveContentResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgCardSchemeBuy":{"type":"object","properties":{"bid":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCardSchemeBuyResponse":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgCardTransfer":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"receiver":{"type":"string"}}},"cardchain.cardchain.MsgCardTransferResponse":{"type":"object"},"cardchain.cardchain.MsgCardVote":{"type":"object","properties":{"creator":{"type":"string"},"vote":{"$ref":"#/definitions/cardchain.cardchain.SingleVote"}}},"cardchain.cardchain.MsgCardVoteMulti":{"type":"object","properties":{"creator":{"type":"string"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/cardchain.cardchain.SingleVote"}}}},"cardchain.cardchain.MsgCardVoteMultiResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgCardVoteResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgCouncilCreate":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilCreateResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilDeregister":{"type":"object","properties":{"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilDeregisterResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilRegister":{"type":"object","properties":{"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilRegisterResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilResponseCommit":{"type":"object","properties":{"councilId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"reponse":{"type":"string"},"suggestion":{"type":"string"}}},"cardchain.cardchain.MsgCouncilResponseCommitResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilResponseReveal":{"type":"object","properties":{"councilId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"reponse":{"$ref":"#/definitions/cardchain.cardchain.Response"},"secret":{"type":"string"}}},"cardchain.cardchain.MsgCouncilResponseRevealResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilRestart":{"type":"object","properties":{"councilId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilRestartResponse":{"type":"object"},"cardchain.cardchain.MsgCreateProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"desc":{"type":"string"},"name":{"type":"string"}}},"cardchain.cardchain.MsgCreateProductDetailsResponse":{"type":"object","properties":{"id":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgDeleteProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"id":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgDeleteProductDetailsResponse":{"type":"object"},"cardchain.cardchain.MsgEarlyAccessInvite":{"type":"object","properties":{"creator":{"type":"string"},"user":{"type":"string"}}},"cardchain.cardchain.MsgEarlyAccessInviteResponse":{"type":"object"},"cardchain.cardchain.MsgEncounterClose":{"type":"object","properties":{"creator":{"type":"string"},"encounterId":{"type":"string","format":"uint64"},"user":{"type":"string"},"won":{"type":"boolean"}}},"cardchain.cardchain.MsgEncounterCloseResponse":{"type":"object"},"cardchain.cardchain.MsgEncounterCreate":{"type":"object","properties":{"creator":{"type":"string"},"drawlist":{"type":"array","items":{"type":"string","format":"uint64"}},"image":{"type":"string","format":"byte"},"name":{"type":"string"},"parameters":{"type":"object","additionalProperties":{"type":"string"}}}},"cardchain.cardchain.MsgEncounterCreateResponse":{"type":"object"},"cardchain.cardchain.MsgEncounterDo":{"type":"object","properties":{"creator":{"type":"string"},"encounterId":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"cardchain.cardchain.MsgEncounterDoResponse":{"type":"object"},"cardchain.cardchain.MsgMatchConfirm":{"type":"object","properties":{"creator":{"type":"string"},"matchId":{"type":"string","format":"uint64"},"outcome":{"$ref":"#/definitions/cardchain.cardchain.Outcome"},"votedCards":{"type":"array","items":{"type":"object","$ref":"#/definitions/cardchain.cardchain.SingleVote"}}}},"cardchain.cardchain.MsgMatchConfirmResponse":{"type":"object"},"cardchain.cardchain.MsgMatchOpen":{"type":"object","properties":{"creator":{"type":"string"},"playerA":{"type":"string"},"playerAdeck":{"type":"array","items":{"type":"string","format":"uint64"}},"playerB":{"type":"string"},"playerBdeck":{"type":"array","items":{"type":"string","format":"uint64"}}}},"cardchain.cardchain.MsgMatchOpenResponse":{"type":"object","properties":{"matchId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgMatchReport":{"type":"object","properties":{"creator":{"type":"string"},"matchId":{"type":"string","format":"uint64"},"outcome":{"$ref":"#/definitions/cardchain.cardchain.Outcome"},"playedCardsA":{"type":"array","items":{"type":"string","format":"uint64"}},"playedCardsB":{"type":"array","items":{"type":"string","format":"uint64"}}}},"cardchain.cardchain.MsgMatchReportResponse":{"type":"object"},"cardchain.cardchain.MsgMatchReporterAppoint":{"type":"object","properties":{"creator":{"type":"string"},"reporter":{"type":"string"}}},"cardchain.cardchain.MsgMatchReporterAppointResponse":{"type":"object"},"cardchain.cardchain.MsgProfileAliasSet":{"type":"object","properties":{"alias":{"type":"string"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgProfileAliasSetResponse":{"type":"object"},"cardchain.cardchain.MsgProfileBioSet":{"type":"object","properties":{"bio":{"type":"string"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgProfileBioSetResponse":{"type":"object"},"cardchain.cardchain.MsgProfileCardSet":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgProfileCardSetResponse":{"type":"object"},"cardchain.cardchain.MsgProfileWebsiteSet":{"type":"object","properties":{"creator":{"type":"string"},"website":{"type":"string"}}},"cardchain.cardchain.MsgProfileWebsiteSetResponse":{"type":"object"},"cardchain.cardchain.MsgSellOfferBuy":{"type":"object","properties":{"creator":{"type":"string"},"sellOfferId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSellOfferBuyResponse":{"type":"object"},"cardchain.cardchain.MsgSellOfferCreate":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"price":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cardchain.cardchain.MsgSellOfferCreateResponse":{"type":"object"},"cardchain.cardchain.MsgSellOfferRemove":{"type":"object","properties":{"creator":{"type":"string"},"sellOfferId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSellOfferRemoveResponse":{"type":"object"},"cardchain.cardchain.MsgSetArtistSet":{"type":"object","properties":{"artist":{"type":"string"},"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetArtistSetResponse":{"type":"object"},"cardchain.cardchain.MsgSetArtworkAdd":{"type":"object","properties":{"creator":{"type":"string"},"image":{"type":"string","format":"byte"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetArtworkAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetCardAdd":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetCardAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetCardRemove":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetCardRemoveResponse":{"type":"object"},"cardchain.cardchain.MsgSetContributorAdd":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"cardchain.cardchain.MsgSetContributorAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetContributorRemove":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"cardchain.cardchain.MsgSetContributorRemoveResponse":{"type":"object"},"cardchain.cardchain.MsgSetCreate":{"type":"object","properties":{"artist":{"type":"string"},"contributors":{"type":"array","items":{"type":"string"}},"creator":{"type":"string"},"name":{"type":"string"},"storyWriter":{"type":"string"}}},"cardchain.cardchain.MsgSetCreateResponse":{"type":"object"},"cardchain.cardchain.MsgSetFinalize":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetFinalizeResponse":{"type":"object"},"cardchain.cardchain.MsgSetNameSet":{"type":"object","properties":{"creator":{"type":"string"},"name":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetNameSetResponse":{"type":"object"},"cardchain.cardchain.MsgSetStoryAdd":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"story":{"type":"string"}}},"cardchain.cardchain.MsgSetStoryAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetStoryWriterSet":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"storyWriter":{"type":"string"}}},"cardchain.cardchain.MsgSetStoryWriterSetResponse":{"type":"object"},"cardchain.cardchain.MsgUpdateParams":{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","type":"object","properties":{"authority":{"description":"authority is the address that controls the module (defaults to x/gov unless\noverwritten).","type":"string"},"params":{"description":"NOTE: All parameters must be supplied.","$ref":"#/definitions/cardchain.cardchain.Params"}}},"cardchain.cardchain.MsgUpdateParamsResponse":{"description":"MsgUpdateParamsResponse defines the response structure for executing a\nMsgUpdateParams message.","type":"object"},"cardchain.cardchain.MsgUpdateProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"desc":{"type":"string"},"id":{"type":"string","format":"uint64"},"name":{"type":"string"}}},"cardchain.cardchain.MsgUpdateProductDetailsResponse":{"type":"object"},"cardchain.cardchain.MsgUserCreate":{"type":"object","properties":{"alias":{"type":"string"},"creator":{"type":"string"},"newUser":{"type":"string"}}},"cardchain.cardchain.MsgUserCreateResponse":{"type":"object"},"cardchain.cardchain.MsgZealyConnect":{"type":"object","properties":{"creator":{"type":"string"},"zealyId":{"type":"string"}}},"cardchain.cardchain.MsgZealyConnectResponse":{"type":"object"},"cardchain.cardchain.Outcome":{"type":"string","default":"AWon","enum":["AWon","BWon","Draw","Aborted"]},"cardchain.cardchain.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"activeSetsAmount":{"type":"string","format":"uint64"},"airDropMaxBlockHeight":{"type":"string","format":"int64"},"airDropValue":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"cardAuctionPriceReductionPeriod":{"type":"string","format":"int64"},"collateralDeposit":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"commonsPerPack":{"type":"string","format":"uint64"},"exceptionalDropRatio":{"type":"string","format":"uint64"},"gameVoteRatio":{"type":"string","format":"int64"},"hourlyFaucet":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"inflationRate":{"type":"string"},"matchWorkerDelay":{"type":"string","format":"uint64"},"rareDropRatio":{"type":"string","format":"uint64"},"raresPerPack":{"type":"string","format":"uint64"},"setCreationFee":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"setPrice":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"setSize":{"type":"string","format":"uint64"},"trialPeriod":{"type":"string","format":"uint64"},"trialVoteReward":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"unCommonsPerPack":{"type":"string","format":"uint64"},"uniqueDropRatio":{"type":"string","format":"uint64"},"votePoolFraction":{"type":"string","format":"int64"},"votingRewardCap":{"type":"string","format":"int64"},"votingRightsExpirationTime":{"type":"string","format":"int64"},"winnerReward":{"type":"string","format":"int64"}}},"cardchain.cardchain.ProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"desc":{"type":"string"},"id":{"type":"string","format":"uint64"},"name":{"type":"string"}}},"cardchain.cardchain.QueryAllProductDetailsResponse":{"type":"object","properties":{"ProductDetails":{"type":"array","items":{"type":"object","$ref":"#/definitions/cardchain.cardchain.ProductDetails"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cardchain.cardchain.QueryGetProductDetailsResponse":{"type":"object","properties":{"ProductDetails":{"$ref":"#/definitions/cardchain.cardchain.ProductDetails"}}},"cardchain.cardchain.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/cardchain.cardchain.Params"}}},"cardchain.cardchain.Response":{"type":"string","default":"Yes","enum":["Yes","No","Suggestion"]},"cardchain.cardchain.SingleVote":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"voteType":{"$ref":"#/definitions/cardchain.cardchain.VoteType"}}},"cardchain.cardchain.VoteType":{"type":"string","default":"fairEnough","enum":["fairEnough","inappropriate","overpowered","underpowered"]},"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"count_total":{"description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"boolean"},"key":{"description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"string","format":"byte"},"limit":{"description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"string","format":"uint64"},"offset":{"description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }","type":"object","properties":{"next_key":{"description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"cosmos.base.v1beta1.Coin":{"description":"Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto.","type":"object","properties":{"amount":{"type":"string"},"denom":{"type":"string"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}}},"tags":[{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file +{"id":"github.com/DecentralCardGame/cardchain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/DecentralCardGame/cardchain REST API","title":"HTTP API Console","contact":{"name":"github.com/DecentralCardGame/cardchain"},"version":"version not set"},"paths":{"/DecentralCardGame/cardchain/cardchain/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComDecentralCardGamecardchainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/DecentralCardGame/cardchain/cardchain/product_details":{"get":{"tags":["Query"],"operationId":"GithubComDecentralCardGamecardchainQuery_ProductDetailsAll","parameters":[{"type":"string","format":"byte","description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","name":"pagination.key","in":"query"},{"type":"string","format":"uint64","description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","name":"pagination.offset","in":"query"},{"type":"string","format":"uint64","description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","name":"pagination.limit","in":"query"},{"type":"boolean","description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.QueryAllProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/DecentralCardGame/cardchain/cardchain/product_details/{id}":{"get":{"tags":["Query"],"summary":"Queries a list of ProductDetails items.","operationId":"GithubComDecentralCardGamecardchainQuery_ProductDetails","parameters":[{"type":"string","format":"uint64","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.QueryGetProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/DecentralCardGame/cardchain/featureflag/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComDecentralCardGamecardchainQuery_ParamsMixin18","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.featureflag.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/BoosterPackBuy":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_BoosterPackBuy","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackBuy"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackBuyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/BoosterPackOpen":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_BoosterPackOpen","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackOpen"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackOpenResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/BoosterPackTransfer":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_BoosterPackTransfer","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackTransfer"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgBoosterPackTransferResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardArtistChange":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardArtistChange","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtistChange"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtistChangeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardArtworkAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardArtworkAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtworkAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardArtworkAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardDonate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardDonate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardDonate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardDonateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardRaritySet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardRaritySet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardRaritySet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardRaritySetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardSaveContent":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardSaveContent","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSaveContent"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSaveContentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardSchemeBuy":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardSchemeBuy","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSchemeBuy"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardSchemeBuyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardTransfer":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardTransfer","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardTransfer"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardTransferResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardVote":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardVote","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVote"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CardVoteMulti":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CardVoteMulti","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVoteMulti"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCardVoteMultiResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilDeregister":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilDeregister","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilDeregister"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilDeregisterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilRegister":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilRegister","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRegister"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRegisterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilResponseCommit":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilResponseCommit","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseCommit"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseCommitResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilResponseReveal":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilResponseReveal","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseReveal"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilResponseRevealResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CouncilRestart":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CouncilRestart","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRestart"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCouncilRestartResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/CreateProductDetails":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_CreateProductDetails","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCreateProductDetails"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgCreateProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/DeleteProductDetails":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_DeleteProductDetails","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgDeleteProductDetails"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgDeleteProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EarlyAccessInvite":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EarlyAccessInvite","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEarlyAccessInvite"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEarlyAccessInviteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EncounterClose":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EncounterClose","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterClose"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterCloseResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EncounterCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EncounterCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/EncounterDo":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_EncounterDo","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterDo"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgEncounterDoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchConfirm":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchConfirm","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchConfirm"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchConfirmResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchOpen":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchOpen","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchOpen"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchOpenResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchReport":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchReport","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReport"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReportResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/MatchReporterAppoint":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_MatchReporterAppoint","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReporterAppoint"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgMatchReporterAppointResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileAliasSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileAliasSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileAliasSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileAliasSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileBioSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileBioSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileBioSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileBioSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileCardSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileCardSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileCardSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileCardSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ProfileWebsiteSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ProfileWebsiteSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileWebsiteSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgProfileWebsiteSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SellOfferBuy":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SellOfferBuy","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferBuy"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferBuyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SellOfferCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SellOfferCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SellOfferRemove":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SellOfferRemove","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferRemove"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSellOfferRemoveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetArtistSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetArtistSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtistSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtistSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetArtworkAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetArtworkAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtworkAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetArtworkAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetCardAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetCardAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetCardRemove":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetCardRemove","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardRemove"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCardRemoveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetContributorAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetContributorAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetContributorRemove":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetContributorRemove","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorRemove"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetContributorRemoveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetFinalize":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetFinalize","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetFinalize"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetFinalizeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetNameSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetNameSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetNameSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetNameSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetStoryAdd":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetStoryAdd","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryAdd"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryAddResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/SetStoryWriterSet":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_SetStoryWriterSet","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryWriterSet"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgSetStoryWriterSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/UpdateParams":{"post":{"tags":["Msg"],"summary":"UpdateParams defines a (governance) operation for updating the module\nparameters. The authority defaults to the x/gov module account.","operationId":"GithubComDecentralCardGamecardchainMsg_UpdateParams","parameters":[{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateParams"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/UpdateProductDetails":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_UpdateProductDetails","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateProductDetails"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUpdateProductDetailsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/UserCreate":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_UserCreate","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUserCreate"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgUserCreateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.cardchain.Msg/ZealyConnect":{"post":{"tags":["Msg"],"operationId":"GithubComDecentralCardGamecardchainMsg_ZealyConnect","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.cardchain.MsgZealyConnect"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.cardchain.MsgZealyConnectResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cardchain.featureflag.Msg/UpdateParams":{"post":{"tags":["Msg"],"summary":"UpdateParams defines a (governance) operation for updating the module\nparameters. The authority defaults to the x/gov module account.","operationId":"GithubComDecentralCardGamecardchainMsg_UpdateParamsMixin19","parameters":[{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cardchain.featureflag.MsgUpdateParams"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cardchain.featureflag.MsgUpdateParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cardchain.cardchain.CardRarity":{"type":"string","default":"common","enum":["common","uncommon","rare","exceptional","unique"]},"cardchain.cardchain.MsgBoosterPackBuy":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgBoosterPackBuyResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgBoosterPackOpen":{"type":"object","properties":{"boosterPackId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgBoosterPackOpenResponse":{"type":"object","properties":{"cardIds":{"type":"array","items":{"type":"string","format":"uint64"}}}},"cardchain.cardchain.MsgBoosterPackTransfer":{"type":"object","properties":{"boosterPackId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"receiver":{"type":"string"}}},"cardchain.cardchain.MsgBoosterPackTransferResponse":{"type":"object"},"cardchain.cardchain.MsgCardArtistChange":{"type":"object","properties":{"artist":{"type":"string"},"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCardArtistChangeResponse":{"type":"object"},"cardchain.cardchain.MsgCardArtworkAdd":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"fullArt":{"type":"boolean"},"image":{"type":"string","format":"byte"}}},"cardchain.cardchain.MsgCardArtworkAddResponse":{"type":"object"},"cardchain.cardchain.MsgCardDonate":{"type":"object","properties":{"amount":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCardDonateResponse":{"type":"object"},"cardchain.cardchain.MsgCardRaritySet":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"rarity":{"$ref":"#/definitions/cardchain.cardchain.CardRarity"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgCardRaritySetResponse":{"type":"object"},"cardchain.cardchain.MsgCardSaveContent":{"type":"object","properties":{"artist":{"type":"string"},"balanceAnchor":{"type":"boolean"},"cardId":{"type":"string","format":"uint64"},"content":{"type":"string","format":"byte"},"creator":{"type":"string"},"notes":{"type":"string"}}},"cardchain.cardchain.MsgCardSaveContentResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgCardSchemeBuy":{"type":"object","properties":{"bid":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCardSchemeBuyResponse":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgCardTransfer":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"receiver":{"type":"string"}}},"cardchain.cardchain.MsgCardTransferResponse":{"type":"object"},"cardchain.cardchain.MsgCardVote":{"type":"object","properties":{"creator":{"type":"string"},"vote":{"$ref":"#/definitions/cardchain.cardchain.SingleVote"}}},"cardchain.cardchain.MsgCardVoteMulti":{"type":"object","properties":{"creator":{"type":"string"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/cardchain.cardchain.SingleVote"}}}},"cardchain.cardchain.MsgCardVoteMultiResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgCardVoteResponse":{"type":"object","properties":{"airdropClaimed":{"type":"boolean"}}},"cardchain.cardchain.MsgCouncilCreate":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilCreateResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilDeregister":{"type":"object","properties":{"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilDeregisterResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilRegister":{"type":"object","properties":{"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilRegisterResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilResponseCommit":{"type":"object","properties":{"councilId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"reponse":{"type":"string"},"suggestion":{"type":"string"}}},"cardchain.cardchain.MsgCouncilResponseCommitResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilResponseReveal":{"type":"object","properties":{"councilId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"reponse":{"$ref":"#/definitions/cardchain.cardchain.Response"},"secret":{"type":"string"}}},"cardchain.cardchain.MsgCouncilResponseRevealResponse":{"type":"object"},"cardchain.cardchain.MsgCouncilRestart":{"type":"object","properties":{"councilId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgCouncilRestartResponse":{"type":"object"},"cardchain.cardchain.MsgCreateProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"desc":{"type":"string"},"name":{"type":"string"}}},"cardchain.cardchain.MsgCreateProductDetailsResponse":{"type":"object","properties":{"id":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgDeleteProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"id":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgDeleteProductDetailsResponse":{"type":"object"},"cardchain.cardchain.MsgEarlyAccessInvite":{"type":"object","properties":{"creator":{"type":"string"},"user":{"type":"string"}}},"cardchain.cardchain.MsgEarlyAccessInviteResponse":{"type":"object"},"cardchain.cardchain.MsgEncounterClose":{"type":"object","properties":{"creator":{"type":"string"},"encounterId":{"type":"string","format":"uint64"},"user":{"type":"string"},"won":{"type":"boolean"}}},"cardchain.cardchain.MsgEncounterCloseResponse":{"type":"object"},"cardchain.cardchain.MsgEncounterCreate":{"type":"object","properties":{"creator":{"type":"string"},"drawlist":{"type":"array","items":{"type":"string","format":"uint64"}},"image":{"type":"string","format":"byte"},"name":{"type":"string"},"parameters":{"type":"object","additionalProperties":{"type":"string"}}}},"cardchain.cardchain.MsgEncounterCreateResponse":{"type":"object"},"cardchain.cardchain.MsgEncounterDo":{"type":"object","properties":{"creator":{"type":"string"},"encounterId":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"cardchain.cardchain.MsgEncounterDoResponse":{"type":"object"},"cardchain.cardchain.MsgMatchConfirm":{"type":"object","properties":{"creator":{"type":"string"},"matchId":{"type":"string","format":"uint64"},"outcome":{"$ref":"#/definitions/cardchain.cardchain.Outcome"},"votedCards":{"type":"array","items":{"type":"object","$ref":"#/definitions/cardchain.cardchain.SingleVote"}}}},"cardchain.cardchain.MsgMatchConfirmResponse":{"type":"object"},"cardchain.cardchain.MsgMatchOpen":{"type":"object","properties":{"creator":{"type":"string"},"playerA":{"type":"string"},"playerAdeck":{"type":"array","items":{"type":"string","format":"uint64"}},"playerB":{"type":"string"},"playerBdeck":{"type":"array","items":{"type":"string","format":"uint64"}}}},"cardchain.cardchain.MsgMatchOpenResponse":{"type":"object","properties":{"matchId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgMatchReport":{"type":"object","properties":{"creator":{"type":"string"},"matchId":{"type":"string","format":"uint64"},"outcome":{"$ref":"#/definitions/cardchain.cardchain.Outcome"},"playedCardsA":{"type":"array","items":{"type":"string","format":"uint64"}},"playedCardsB":{"type":"array","items":{"type":"string","format":"uint64"}}}},"cardchain.cardchain.MsgMatchReportResponse":{"type":"object"},"cardchain.cardchain.MsgMatchReporterAppoint":{"type":"object","properties":{"creator":{"type":"string"},"reporter":{"type":"string"}}},"cardchain.cardchain.MsgMatchReporterAppointResponse":{"type":"object"},"cardchain.cardchain.MsgProfileAliasSet":{"type":"object","properties":{"alias":{"type":"string"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgProfileAliasSetResponse":{"type":"object"},"cardchain.cardchain.MsgProfileBioSet":{"type":"object","properties":{"bio":{"type":"string"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgProfileBioSetResponse":{"type":"object"},"cardchain.cardchain.MsgProfileCardSet":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"}}},"cardchain.cardchain.MsgProfileCardSetResponse":{"type":"object"},"cardchain.cardchain.MsgProfileWebsiteSet":{"type":"object","properties":{"creator":{"type":"string"},"website":{"type":"string"}}},"cardchain.cardchain.MsgProfileWebsiteSetResponse":{"type":"object"},"cardchain.cardchain.MsgSellOfferBuy":{"type":"object","properties":{"creator":{"type":"string"},"sellOfferId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSellOfferBuyResponse":{"type":"object"},"cardchain.cardchain.MsgSellOfferCreate":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"price":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cardchain.cardchain.MsgSellOfferCreateResponse":{"type":"object"},"cardchain.cardchain.MsgSellOfferRemove":{"type":"object","properties":{"creator":{"type":"string"},"sellOfferId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSellOfferRemoveResponse":{"type":"object"},"cardchain.cardchain.MsgSetArtistSet":{"type":"object","properties":{"artist":{"type":"string"},"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetArtistSetResponse":{"type":"object"},"cardchain.cardchain.MsgSetArtworkAdd":{"type":"object","properties":{"creator":{"type":"string"},"image":{"type":"string","format":"byte"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetArtworkAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetCardAdd":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetCardAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetCardRemove":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetCardRemoveResponse":{"type":"object"},"cardchain.cardchain.MsgSetContributorAdd":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"cardchain.cardchain.MsgSetContributorAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetContributorRemove":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"user":{"type":"string"}}},"cardchain.cardchain.MsgSetContributorRemoveResponse":{"type":"object"},"cardchain.cardchain.MsgSetCreate":{"type":"object","properties":{"artist":{"type":"string"},"contributors":{"type":"array","items":{"type":"string"}},"creator":{"type":"string"},"name":{"type":"string"},"storyWriter":{"type":"string"}}},"cardchain.cardchain.MsgSetCreateResponse":{"type":"object"},"cardchain.cardchain.MsgSetFinalize":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetFinalizeResponse":{"type":"object"},"cardchain.cardchain.MsgSetNameSet":{"type":"object","properties":{"creator":{"type":"string"},"name":{"type":"string"},"setId":{"type":"string","format":"uint64"}}},"cardchain.cardchain.MsgSetNameSetResponse":{"type":"object"},"cardchain.cardchain.MsgSetStoryAdd":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"story":{"type":"string"}}},"cardchain.cardchain.MsgSetStoryAddResponse":{"type":"object"},"cardchain.cardchain.MsgSetStoryWriterSet":{"type":"object","properties":{"creator":{"type":"string"},"setId":{"type":"string","format":"uint64"},"storyWriter":{"type":"string"}}},"cardchain.cardchain.MsgSetStoryWriterSetResponse":{"type":"object"},"cardchain.cardchain.MsgUpdateParams":{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","type":"object","properties":{"authority":{"description":"authority is the address that controls the module (defaults to x/gov unless\noverwritten).","type":"string"},"params":{"description":"NOTE: All parameters must be supplied.","$ref":"#/definitions/cardchain.cardchain.Params"}}},"cardchain.cardchain.MsgUpdateParamsResponse":{"description":"MsgUpdateParamsResponse defines the response structure for executing a\nMsgUpdateParams message.","type":"object"},"cardchain.cardchain.MsgUpdateProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"desc":{"type":"string"},"id":{"type":"string","format":"uint64"},"name":{"type":"string"}}},"cardchain.cardchain.MsgUpdateProductDetailsResponse":{"type":"object"},"cardchain.cardchain.MsgUserCreate":{"type":"object","properties":{"alias":{"type":"string"},"creator":{"type":"string"},"newUser":{"type":"string"}}},"cardchain.cardchain.MsgUserCreateResponse":{"type":"object"},"cardchain.cardchain.MsgZealyConnect":{"type":"object","properties":{"creator":{"type":"string"},"zealyId":{"type":"string"}}},"cardchain.cardchain.MsgZealyConnectResponse":{"type":"object"},"cardchain.cardchain.Outcome":{"type":"string","default":"AWon","enum":["AWon","BWon","Draw","Aborted"]},"cardchain.cardchain.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"activeSetsAmount":{"type":"string","format":"uint64"},"airDropMaxBlockHeight":{"type":"string","format":"int64"},"airDropValue":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"cardAuctionPriceReductionPeriod":{"type":"string","format":"int64"},"collateralDeposit":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"commonsPerPack":{"type":"string","format":"uint64"},"exceptionalDropRatio":{"type":"string","format":"uint64"},"gameVoteRatio":{"type":"string","format":"int64"},"hourlyFaucet":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"inflationRate":{"type":"string"},"matchWorkerDelay":{"type":"string","format":"uint64"},"rareDropRatio":{"type":"string","format":"uint64"},"raresPerPack":{"type":"string","format":"uint64"},"setCreationFee":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"setPrice":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"setSize":{"type":"string","format":"uint64"},"trialPeriod":{"type":"string","format":"uint64"},"trialVoteReward":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"unCommonsPerPack":{"type":"string","format":"uint64"},"uniqueDropRatio":{"type":"string","format":"uint64"},"votePoolFraction":{"type":"string","format":"int64"},"votingRewardCap":{"type":"string","format":"int64"},"votingRightsExpirationTime":{"type":"string","format":"int64"},"winnerReward":{"type":"string","format":"int64"}}},"cardchain.cardchain.ProductDetails":{"type":"object","properties":{"creator":{"type":"string"},"desc":{"type":"string"},"id":{"type":"string","format":"uint64"},"name":{"type":"string"}}},"cardchain.cardchain.QueryAllProductDetailsResponse":{"type":"object","properties":{"ProductDetails":{"type":"array","items":{"type":"object","$ref":"#/definitions/cardchain.cardchain.ProductDetails"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cardchain.cardchain.QueryGetProductDetailsResponse":{"type":"object","properties":{"ProductDetails":{"$ref":"#/definitions/cardchain.cardchain.ProductDetails"}}},"cardchain.cardchain.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/cardchain.cardchain.Params"}}},"cardchain.cardchain.Response":{"type":"string","default":"Yes","enum":["Yes","No","Suggestion"]},"cardchain.cardchain.SingleVote":{"type":"object","properties":{"cardId":{"type":"string","format":"uint64"},"voteType":{"$ref":"#/definitions/cardchain.cardchain.VoteType"}}},"cardchain.cardchain.VoteType":{"type":"string","default":"fairEnough","enum":["fairEnough","inappropriate","overpowered","underpowered"]},"cardchain.featureflag.MsgUpdateParams":{"description":"MsgUpdateParams is the Msg/UpdateParams request type.","type":"object","properties":{"authority":{"description":"authority is the address that controls the module (defaults to x/gov unless overwritten).","type":"string"},"params":{"description":"params defines the module parameters to update.\n\nNOTE: All parameters must be supplied.","$ref":"#/definitions/cardchain.featureflag.Params"}}},"cardchain.featureflag.MsgUpdateParamsResponse":{"description":"MsgUpdateParamsResponse defines the response structure for executing a\nMsgUpdateParams message.","type":"object"},"cardchain.featureflag.Params":{"description":"Params defines the parameters for the module.","type":"object"},"cardchain.featureflag.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/cardchain.featureflag.Params"}}},"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"count_total":{"description":"count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.","type":"boolean"},"key":{"description":"key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.","type":"string","format":"byte"},"limit":{"description":"limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.","type":"string","format":"uint64"},"offset":{"description":"offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"description":"PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }","type":"object","properties":{"next_key":{"description":"next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"cosmos.base.v1beta1.Coin":{"description":"Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto.","type":"object","properties":{"amount":{"type":"string"},"denom":{"type":"string"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}}},"tags":[{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file diff --git a/proto/cardchain/featureflag/flag.proto b/proto/cardchain/featureflag/flag.proto new file mode 100644 index 00000000..8c887476 --- /dev/null +++ b/proto/cardchain/featureflag/flag.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +package cardchain.featureflag; + +option go_package = "github.com/DecentralCardGame/cardchain/x/featureflag/types"; + +message Flag { + string Module = 1; + string Name = 2; + bool Set = 3; +} diff --git a/proto/cardchain/featureflag/genesis.proto b/proto/cardchain/featureflag/genesis.proto new file mode 100644 index 00000000..0cac056c --- /dev/null +++ b/proto/cardchain/featureflag/genesis.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package cardchain.featureflag; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; +import "cardchain/featureflag/params.proto"; +import "cardchain/featureflag/flag.proto"; + +option go_package = "github.com/DecentralCardGame/cardchain/x/featureflag/types"; + +// GenesisState defines the featureflag module's genesis state. +message GenesisState { + // params defines all the parameters of the module. + Params params = 1 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + + map flags = 2; +} diff --git a/proto/cardchain/featureflag/module/module.proto b/proto/cardchain/featureflag/module/module.proto new file mode 100644 index 00000000..6bdb6088 --- /dev/null +++ b/proto/cardchain/featureflag/module/module.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package cardchain.featureflag.module; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object for the module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "github.com/DecentralCardGame/cardchain/x/featureflag" + }; + + // authority defines the custom module authority. If not set, defaults to the governance module. + string authority = 1; +} \ No newline at end of file diff --git a/proto/cardchain/featureflag/params.proto b/proto/cardchain/featureflag/params.proto new file mode 100644 index 00000000..bba3a380 --- /dev/null +++ b/proto/cardchain/featureflag/params.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package cardchain.featureflag; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/DecentralCardGame/cardchain/x/featureflag/types"; + +// Params defines the parameters for the module. +message Params { + option (amino.name) = "cardchain/x/featureflag/Params"; + option (gogoproto.equal) = true; + + +} \ No newline at end of file diff --git a/proto/cardchain/featureflag/query.proto b/proto/cardchain/featureflag/query.proto new file mode 100644 index 00000000..bb9d652b --- /dev/null +++ b/proto/cardchain/featureflag/query.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package cardchain.featureflag; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cardchain/featureflag/params.proto"; + +option go_package = "github.com/DecentralCardGame/cardchain/x/featureflag/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/DecentralCardGame/cardchain/featureflag/params"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} \ No newline at end of file diff --git a/proto/cardchain/featureflag/tx.proto b/proto/cardchain/featureflag/tx.proto new file mode 100644 index 00000000..636a7189 --- /dev/null +++ b/proto/cardchain/featureflag/tx.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package cardchain.featureflag; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "cardchain/featureflag/params.proto"; + +option go_package = "github.com/DecentralCardGame/cardchain/x/featureflag/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "cardchain/x/featureflag/MsgUpdateParams"; + + // authority is the address that controls the module (defaults to x/gov 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 {} \ No newline at end of file diff --git a/testutil/keeper/featureflag.go b/testutil/keeper/featureflag.go new file mode 100644 index 00000000..d2769be2 --- /dev/null +++ b/testutil/keeper/featureflag.go @@ -0,0 +1,51 @@ +package keeper + +import ( + "testing" + + "cosmossdk.io/log" + "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + storetypes "cosmossdk.io/store/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/stretchr/testify/require" + + "github.com/DecentralCardGame/cardchain/x/featureflag/keeper" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +func FeatureflagKeeper(t testing.TB) (keeper.Keeper, sdk.Context) { + storeKey := storetypes.NewKVStoreKey(types.StoreKey) + + db := dbm.NewMemDB() + stateStore := store.NewCommitMultiStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) + stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) + require.NoError(t, stateStore.LoadLatestVersion()) + + registry := codectypes.NewInterfaceRegistry() + cdc := codec.NewProtoCodec(registry) + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + + k := keeper.NewKeeper( + cdc, + runtime.NewKVStoreService(storeKey), + log.NewNopLogger(), + authority.String(), + ) + + ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger()) + + // Initialize params + if err := k.SetParams(ctx, types.DefaultParams()); err != nil { + panic(err) + } + + return k, ctx +} diff --git a/x/cardchain/keeper/keeper.go b/x/cardchain/keeper/keeper.go index 0ee57428..c4ae9112 100644 --- a/x/cardchain/keeper/keeper.go +++ b/x/cardchain/keeper/keeper.go @@ -10,6 +10,7 @@ import ( gtk "github.com/DecentralCardGame/cardchain/types/generic_type_keeper" "github.com/DecentralCardGame/cardchain/x/cardchain/types" + ffKeeper "github.com/DecentralCardGame/cardchain/x/featureflag/keeper" ) type ( @@ -33,7 +34,8 @@ type ( // should be the x/gov module account. authority string - BankKeeper types.BankKeeper + BankKeeper types.BankKeeper + FeatureFlagModuleInstance ffKeeper.ModuleInstance } ) @@ -43,6 +45,7 @@ func NewKeeper( logger log.Logger, authority string, bankKeeper types.BankKeeper, + featureFlagKeeper types.FeatureFlagKeeper, ) Keeper { if _, err := sdk.AccAddressFromBech32(authority); err != nil { @@ -66,7 +69,8 @@ func NewKeeper( Servers: gtk.NewGTK[*types.Server]("Servers", storeService, cdc, gtk.GetEmpty[types.Server]), Encounters: gtk.NewGTK[*types.Encounter]("Encounters", storeService, cdc, gtk.GetEmpty[types.Encounter]), - BankKeeper: bankKeeper, + FeatureFlagModuleInstance: featureFlagKeeper.GetModuleInstance(types.ModuleName, []string{string(types.FeatureFlagName_Council), string(types.FeatureFlagName_Matches)}), + BankKeeper: bankKeeper, } } diff --git a/x/cardchain/module/module.go b/x/cardchain/module/module.go index dcff5bfe..dedf9ced 100644 --- a/x/cardchain/module/module.go +++ b/x/cardchain/module/module.go @@ -180,8 +180,9 @@ type ModuleInputs struct { Config *modulev1.Module Logger log.Logger - AccountKeeper types.AccountKeeper - BankKeeper types.BankKeeper + AccountKeeper types.AccountKeeper + BankKeeper types.BankKeeper + FeatureFlagKeeper types.FeatureFlagKeeper } type ModuleOutputs struct { @@ -203,6 +204,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.Logger, authority.String(), in.BankKeeper, + in.FeatureFlagKeeper, ) m := NewAppModule( in.Cdc, diff --git a/x/cardchain/types/expected_keepers.go b/x/cardchain/types/expected_keepers.go index 94466ccd..34bb5bc3 100644 --- a/x/cardchain/types/expected_keepers.go +++ b/x/cardchain/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( "context" + ffKeeper "github.com/DecentralCardGame/cardchain/x/featureflag/keeper" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -12,6 +13,10 @@ type AccountKeeper interface { // Methods imported from account should be defined here } +type FeatureFlagKeeper interface { + GetModuleInstance(moduleName string, flagNames []string) ffKeeper.ModuleInstance +} + // BankKeeper defines the expected interface for the Bank module. type BankKeeper interface { SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins diff --git a/x/cardchain/types/feature_flags.go b/x/cardchain/types/feature_flags.go new file mode 100644 index 00000000..b4b816f4 --- /dev/null +++ b/x/cardchain/types/feature_flags.go @@ -0,0 +1,8 @@ +package types + +type FeatureFlagName string + +const ( + FeatureFlagName_Council FeatureFlagName = "council" + FeatureFlagName_Matches FeatureFlagName = "matches" +) diff --git a/x/featureflag/keeper/keeper.go b/x/featureflag/keeper/keeper.go new file mode 100644 index 00000000..211263a1 --- /dev/null +++ b/x/featureflag/keeper/keeper.go @@ -0,0 +1,126 @@ +package keeper + +import ( + "fmt" + "slices" + + "cosmossdk.io/core/store" + sdkerrors "cosmossdk.io/errors" + "cosmossdk.io/log" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" + db "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +const flagStoreKey = "Flags" + +type ( + Keeper struct { + cdc codec.BinaryCodec + storeService store.KVStoreService + logger log.Logger + + // the address capable of executing a MsgUpdateParams message. Typically, this + // should be the x/gov module account. + authority string + flagKeys *[][2]string + } +) + +func NewKeeper( + cdc codec.BinaryCodec, + storeService store.KVStoreService, + logger log.Logger, + authority string, + +) Keeper { + if _, err := sdk.AccAddressFromBech32(authority); err != nil { + panic(fmt.Sprintf("invalid authority address: %s", authority)) + } + + return Keeper{ + cdc: cdc, + storeService: storeService, + authority: authority, + logger: logger, + flagKeys: &[][2]string{}, + } +} + +// GetAuthority returns the module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + +func (k Keeper) FlagExists(module string, name string) error { + if slices.Contains(*k.flagKeys, [2]string{module, name}) { + return nil + } + + return sdkerrors.Wrapf(types.ErrFlagUnregisterd, "Flag '%s' for module '%s'", name, module) +} + +func (k Keeper) RegisterKey(module string, name string) { + *k.flagKeys = append(*k.flagKeys, [2]string{module, name}) +} + +func (k Keeper) InitAllStores(ctx sdk.Context) { + for _, tup := range *k.flagKeys { + k.SetFlag(ctx, GetKey(tup[0], tup[1]), types.Flag{ + Module: tup[0], + Name: tup[1], + Set: false, + }) + } +} + +func (k Keeper) GetModuleInstance(moduleName string, flagNames []string) ModuleInstance { + return NewModuleInstance(k, moduleName, flagNames) +} + +func GetKey(module string, name string) []byte { + return []byte(module + "-" + name) +} + +func (k Keeper) GetFlag(ctx sdk.Context, key []byte) (gottenFlag types.Flag) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(flagStoreKey)) + b := store.Get(key) + k.cdc.MustUnmarshal(b, &gottenFlag) + return +} + +func (k Keeper) SetFlag(ctx sdk.Context, key []byte, flag types.Flag) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(flagStoreKey)) + store.Set(key, k.cdc.MustMarshal(&flag)) +} + +func (k Keeper) GetFlagsIterator(ctx sdk.Context) db.Iterator { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(flagStoreKey)) + return storetypes.KVStorePrefixIterator(store, []byte{}) +} + +func (k Keeper) GetAllFlags(ctx sdk.Context) (allFlags []*types.Flag, allKeys []string) { + iterator := k.GetFlagsIterator(ctx) + for ; iterator.Valid(); iterator.Next() { + + var gottenFlag types.Flag + k.cdc.MustUnmarshal(iterator.Value(), &gottenFlag) + + allFlags = append(allFlags, &gottenFlag) + allKeys = append(allKeys, string(iterator.Key())) + } + return +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger() log.Logger { + return k.logger.With("module", fmt.Sprintf("x/%s", types.ModuleName)) +} diff --git a/x/featureflag/keeper/module_instace.go b/x/featureflag/keeper/module_instace.go new file mode 100644 index 00000000..46ba6a72 --- /dev/null +++ b/x/featureflag/keeper/module_instace.go @@ -0,0 +1,33 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ModuleInstance struct { + moduleName string + k Keeper +} + +func NewModuleInstance(keeper Keeper, moduleName string, names []string) ModuleInstance { + instance := ModuleInstance{ + moduleName: moduleName, + k: keeper, + } + for _, name := range names { + keeper.RegisterKey(moduleName, name) + } + return instance +} + +func (m ModuleInstance) Get(ctx sdk.Context, name string) (bool, error) { + err := m.nameExists(name) + if err != nil { + return false, err + } + return m.k.GetFlag(ctx, GetKey(m.moduleName, name)).Set, nil +} + +func (m ModuleInstance) nameExists(name string) error { + return m.k.FlagExists(m.moduleName, name) +} diff --git a/x/featureflag/keeper/msg_server.go b/x/featureflag/keeper/msg_server.go new file mode 100644 index 00000000..f0f5d3fc --- /dev/null +++ b/x/featureflag/keeper/msg_server.go @@ -0,0 +1,17 @@ +package keeper + +import ( + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +var _ types.MsgServer = msgServer{} diff --git a/x/featureflag/keeper/msg_server_test.go b/x/featureflag/keeper/msg_server_test.go new file mode 100644 index 00000000..dafc0ba3 --- /dev/null +++ b/x/featureflag/keeper/msg_server_test.go @@ -0,0 +1,24 @@ +package keeper_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + keepertest "github.com/DecentralCardGame/cardchain/testutil/keeper" + "github.com/DecentralCardGame/cardchain/x/featureflag/keeper" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +func setupMsgServer(t testing.TB) (keeper.Keeper, types.MsgServer, context.Context) { + k, ctx := keepertest.FeatureflagKeeper(t) + return k, keeper.NewMsgServerImpl(k), ctx +} + +func TestMsgServer(t *testing.T) { + k, ms, ctx := setupMsgServer(t) + require.NotNil(t, ms) + require.NotNil(t, ctx) + require.NotEmpty(t, k) +} diff --git a/x/featureflag/keeper/msg_update_params.go b/x/featureflag/keeper/msg_update_params.go new file mode 100644 index 00000000..2ab13dc2 --- /dev/null +++ b/x/featureflag/keeper/msg_update_params.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +func (k msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if k.GetAuthority() != req.Authority { + return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), req.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := k.SetParams(ctx, req.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/featureflag/keeper/msg_update_params_test.go b/x/featureflag/keeper/msg_update_params_test.go new file mode 100644 index 00000000..8cf0ea12 --- /dev/null +++ b/x/featureflag/keeper/msg_update_params_test.go @@ -0,0 +1,64 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +func TestMsgUpdateParams(t *testing.T) { + k, ms, ctx := setupMsgServer(t) + params := types.DefaultParams() + require.NoError(t, k.SetParams(ctx, params)) + wctx := sdk.UnwrapSDKContext(ctx) + + // default params + testCases := []struct { + name string + input *types.MsgUpdateParams + expErr bool + expErrMsg string + }{ + { + name: "invalid authority", + input: &types.MsgUpdateParams{ + Authority: "invalid", + Params: params, + }, + expErr: true, + expErrMsg: "invalid authority", + }, + { + name: "send enabled param", + input: &types.MsgUpdateParams{ + Authority: k.GetAuthority(), + Params: types.Params{}, + }, + expErr: false, + }, + { + name: "all good", + input: &types.MsgUpdateParams{ + Authority: k.GetAuthority(), + Params: params, + }, + expErr: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := ms.UpdateParams(wctx, tc.input) + + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/featureflag/keeper/params.go b/x/featureflag/keeper/params.go new file mode 100644 index 00000000..eac042d6 --- /dev/null +++ b/x/featureflag/keeper/params.go @@ -0,0 +1,33 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/runtime" + + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +// GetParams get all parameters as types.Params +func (k Keeper) GetParams(ctx context.Context) (params types.Params) { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + bz := store.Get(types.ParamsKey) + if bz == nil { + return params + } + + k.cdc.MustUnmarshal(bz, ¶ms) + return params +} + +// SetParams set the params +func (k Keeper) SetParams(ctx context.Context, params types.Params) error { + store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + bz, err := k.cdc.Marshal(¶ms) + if err != nil { + return err + } + store.Set(types.ParamsKey, bz) + + return nil +} diff --git a/x/featureflag/keeper/params_test.go b/x/featureflag/keeper/params_test.go new file mode 100644 index 00000000..209b7708 --- /dev/null +++ b/x/featureflag/keeper/params_test.go @@ -0,0 +1,18 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + keepertest "github.com/DecentralCardGame/cardchain/testutil/keeper" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +func TestGetParams(t *testing.T) { + k, ctx := keepertest.FeatureflagKeeper(t) + params := types.DefaultParams() + + require.NoError(t, k.SetParams(ctx, params)) + require.EqualValues(t, params, k.GetParams(ctx)) +} diff --git a/x/featureflag/keeper/query.go b/x/featureflag/keeper/query.go new file mode 100644 index 00000000..61676d11 --- /dev/null +++ b/x/featureflag/keeper/query.go @@ -0,0 +1,7 @@ +package keeper + +import ( + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +var _ types.QueryServer = Keeper{} diff --git a/x/featureflag/keeper/query_params.go b/x/featureflag/keeper/query_params.go new file mode 100644 index 00000000..37221669 --- /dev/null +++ b/x/featureflag/keeper/query_params.go @@ -0,0 +1,20 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil +} diff --git a/x/featureflag/keeper/query_params_test.go b/x/featureflag/keeper/query_params_test.go new file mode 100644 index 00000000..ec83319d --- /dev/null +++ b/x/featureflag/keeper/query_params_test.go @@ -0,0 +1,20 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + keepertest "github.com/DecentralCardGame/cardchain/testutil/keeper" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +func TestParamsQuery(t *testing.T) { + keeper, ctx := keepertest.FeatureflagKeeper(t) + params := types.DefaultParams() + require.NoError(t, keeper.SetParams(ctx, params)) + + response, err := keeper.Params(ctx, &types.QueryParamsRequest{}) + require.NoError(t, err) + require.Equal(t, &types.QueryParamsResponse{Params: params}, response) +} diff --git a/x/featureflag/module/autocli.go b/x/featureflag/module/autocli.go new file mode 100644 index 00000000..0572b5e4 --- /dev/null +++ b/x/featureflag/module/autocli.go @@ -0,0 +1,35 @@ +package featureflag + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + + modulev1 "github.com/DecentralCardGame/cardchain/api/cardchain/featureflag" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Shows the parameters of the module", + }, + // this line is used by ignite scaffolding # autocli/query + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Msg_ServiceDesc.ServiceName, + EnhanceCustomCommand: true, // only required if you want to use the custom command + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + // this line is used by ignite scaffolding # autocli/tx + }, + }, + } +} diff --git a/x/featureflag/module/genesis.go b/x/featureflag/module/genesis.go new file mode 100644 index 00000000..7f41a4c6 --- /dev/null +++ b/x/featureflag/module/genesis.go @@ -0,0 +1,26 @@ +package featureflag + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/DecentralCardGame/cardchain/x/featureflag/keeper" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +// InitGenesis initializes the module's state from a provided genesis state. +func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { + // this line is used by starport scaffolding # genesis/module/init + if err := k.SetParams(ctx, genState.Params); err != nil { + panic(err) + } +} + +// ExportGenesis returns the module's exported genesis. +func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { + genesis := types.DefaultGenesis() + genesis.Params = k.GetParams(ctx) + + // this line is used by starport scaffolding # genesis/module/export + + return genesis +} diff --git a/x/featureflag/module/genesis_test.go b/x/featureflag/module/genesis_test.go new file mode 100644 index 00000000..35c1b85a --- /dev/null +++ b/x/featureflag/module/genesis_test.go @@ -0,0 +1,29 @@ +package featureflag_test + +import ( + "testing" + + keepertest "github.com/DecentralCardGame/cardchain/testutil/keeper" + "github.com/DecentralCardGame/cardchain/testutil/nullify" + featureflag "github.com/DecentralCardGame/cardchain/x/featureflag/module" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" + "github.com/stretchr/testify/require" +) + +func TestGenesis(t *testing.T) { + genesisState := types.GenesisState{ + Params: types.DefaultParams(), + + // this line is used by starport scaffolding # genesis/test/state + } + + k, ctx := keepertest.FeatureflagKeeper(t) + featureflag.InitGenesis(ctx, k, genesisState) + got := featureflag.ExportGenesis(ctx, k) + require.NotNil(t, got) + + nullify.Fill(&genesisState) + nullify.Fill(got) + + // this line is used by starport scaffolding # genesis/test/assert +} diff --git a/x/featureflag/module/module.go b/x/featureflag/module/module.go new file mode 100644 index 00000000..d4c325d8 --- /dev/null +++ b/x/featureflag/module/module.go @@ -0,0 +1,214 @@ +package featureflag + +import ( + "context" + "encoding/json" + "fmt" + + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + + // this line is used by starport scaffolding # 1 + + modulev1 "github.com/DecentralCardGame/cardchain/api/cardchain/featureflag/module" + "github.com/DecentralCardGame/cardchain/x/featureflag/keeper" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +var ( + _ module.AppModuleBasic = (*AppModule)(nil) + _ module.AppModuleSimulation = (*AppModule)(nil) + _ module.HasGenesis = (*AppModule)(nil) + _ module.HasInvariants = (*AppModule)(nil) + _ module.HasConsensusVersion = (*AppModule)(nil) + + _ appmodule.AppModule = (*AppModule)(nil) + _ appmodule.HasBeginBlocker = (*AppModule)(nil) + _ appmodule.HasEndBlocker = (*AppModule)(nil) +) + +// ---------------------------------------------------------------------------- +// AppModuleBasic +// ---------------------------------------------------------------------------- + +// AppModuleBasic implements the AppModuleBasic interface that defines the +// independent methods a Cosmos SDK module needs to implement. +type AppModuleBasic struct { + cdc codec.BinaryCodec +} + +func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { + return AppModuleBasic{cdc: cdc} +} + +// Name returns the name of the module as a string. +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +// RegisterLegacyAminoCodec registers the amino codec for the module, which is used +// to marshal and unmarshal structs to/from []byte in order to persist them in the module's KVStore. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} + +// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. +func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { + types.RegisterInterfaces(reg) +} + +// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. +// The default GenesisState need to be defined by the module developer and is primarily used for testing. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesis()) +} + +// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + var genState types.GenesisState + if err := cdc.UnmarshalJSON(bz, &genState); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + return genState.Validate() +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +// ---------------------------------------------------------------------------- +// AppModule +// ---------------------------------------------------------------------------- + +// AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper +} + +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + accountKeeper types.AccountKeeper, + bankKeeper types.BankKeeper, +) AppModule { + return AppModule{ + AppModuleBasic: NewAppModuleBasic(cdc), + keeper: keeper, + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + } +} + +// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), am.keeper) +} + +// RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted) +func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} + +// InitGenesis performs the module's genesis initialization. It returns no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { + var genState types.GenesisState + // Initialize global index to index in genesis state + cdc.MustUnmarshalJSON(gs, &genState) + + InitGenesis(ctx, am.keeper, genState) +} + +// ExportGenesis returns the module's exported genesis state as raw JSON bytes. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + genState := ExportGenesis(ctx, am.keeper) + return cdc.MustMarshalJSON(genState) +} + +// ConsensusVersion is a sequence number for state-breaking change of the module. +// It should be incremented on each consensus-breaking change introduced by the module. +// To avoid wrong/empty versions, the initial version should be set to 1. +func (AppModule) ConsensusVersion() uint64 { return 1 } + +// BeginBlock contains the logic that is automatically triggered at the beginning of each block. +// The begin block implementation is optional. +func (am AppModule) BeginBlock(_ context.Context) error { + return nil +} + +// EndBlock contains the logic that is automatically triggered at the end of each block. +// The end block implementation is optional. +func (am AppModule) EndBlock(_ context.Context) error { + return nil +} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// ---------------------------------------------------------------------------- +// App Wiring Setup +// ---------------------------------------------------------------------------- + +func init() { + appmodule.Register( + &modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + StoreService store.KVStoreService + Cdc codec.Codec + Config *modulev1.Module + Logger log.Logger + + AccountKeeper types.AccountKeeper + BankKeeper types.BankKeeper +} + +type ModuleOutputs struct { + depinject.Out + + FeatureflagKeeper keeper.Keeper + Module appmodule.AppModule +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + // default to governance authority if not provided + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + k := keeper.NewKeeper( + in.Cdc, + in.StoreService, + in.Logger, + authority.String(), + ) + m := NewAppModule( + in.Cdc, + k, + in.AccountKeeper, + in.BankKeeper, + ) + + return ModuleOutputs{FeatureflagKeeper: k, Module: m} +} diff --git a/x/featureflag/module/simulation.go b/x/featureflag/module/simulation.go new file mode 100644 index 00000000..0b26081d --- /dev/null +++ b/x/featureflag/module/simulation.go @@ -0,0 +1,59 @@ +package featureflag + +import ( + "math/rand" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/simulation" + + "github.com/DecentralCardGame/cardchain/testutil/sample" + featureflagsimulation "github.com/DecentralCardGame/cardchain/x/featureflag/simulation" + "github.com/DecentralCardGame/cardchain/x/featureflag/types" +) + +// avoid unused import issue +var ( + _ = featureflagsimulation.FindAccount + _ = rand.Rand{} + _ = sample.AccAddress + _ = sdk.AccAddress{} + _ = simulation.MsgEntryKind +) + +const ( +// this line is used by starport scaffolding # simapp/module/const +) + +// GenerateGenesisState creates a randomized GenState of the module. +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + accs := make([]string, len(simState.Accounts)) + for i, acc := range simState.Accounts { + accs[i] = acc.Address.String() + } + featureflagGenesis := types.GenesisState{ + Params: types.DefaultParams(), + // this line is used by starport scaffolding # simapp/module/genesisState + } + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&featureflagGenesis) +} + +// RegisterStoreDecoder registers a decoder. +func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} + +// WeightedOperations returns the all the gov module operations with their respective weights. +func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + operations := make([]simtypes.WeightedOperation, 0) + + // this line is used by starport scaffolding # simapp/module/operation + + return operations +} + +// ProposalMsgs returns msgs used for governance proposals for simulations. +func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { + return []simtypes.WeightedProposalMsg{ + // this line is used by starport scaffolding # simapp/module/OpMsg + } +} diff --git a/x/featureflag/simulation/helpers.go b/x/featureflag/simulation/helpers.go new file mode 100644 index 00000000..92c437c0 --- /dev/null +++ b/x/featureflag/simulation/helpers.go @@ -0,0 +1,15 @@ +package simulation + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +// FindAccount find a specific address from an account list +func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { + creator, err := sdk.AccAddressFromBech32(address) + if err != nil { + panic(err) + } + return simtypes.FindAccount(accs, creator) +} diff --git a/x/featureflag/types/codec.go b/x/featureflag/types/codec.go new file mode 100644 index 00000000..ac552637 --- /dev/null +++ b/x/featureflag/types/codec.go @@ -0,0 +1,17 @@ +package types + +import ( + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + // this line is used by starport scaffolding # 1 +) + +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + // this line is used by starport scaffolding # 3 + + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/featureflag/types/errors.go b/x/featureflag/types/errors.go new file mode 100644 index 00000000..ba5be16f --- /dev/null +++ b/x/featureflag/types/errors.go @@ -0,0 +1,13 @@ +package types + +// DONTCOVER + +import ( + sdkerrors "cosmossdk.io/errors" +) + +// x/featureflag module sentinel errors +var ( + ErrInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") + ErrFlagUnregisterd = sdkerrors.Register(ModuleName, 1, "Flag is not registered") +) diff --git a/x/featureflag/types/expected_keepers.go b/x/featureflag/types/expected_keepers.go new file mode 100644 index 00000000..4a50d01a --- /dev/null +++ b/x/featureflag/types/expected_keepers.go @@ -0,0 +1,25 @@ +package types + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// AccountKeeper defines the expected interface for the Account module. +type AccountKeeper interface { + GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation + // Methods imported from account should be defined here +} + +// BankKeeper defines the expected interface for the Bank module. +type BankKeeper interface { + SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins + // Methods imported from bank should be defined here +} + +// ParamSubspace defines the expected Subspace interface for parameters. +type ParamSubspace interface { + Get(context.Context, []byte, interface{}) + Set(context.Context, []byte, interface{}) +} diff --git a/x/featureflag/types/flag.pb.go b/x/featureflag/types/flag.pb.go new file mode 100644 index 00000000..e1dd5d4d --- /dev/null +++ b/x/featureflag/types/flag.pb.go @@ -0,0 +1,409 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cardchain/featureflag/flag.proto + +package types + +import ( + fmt "fmt" + 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 + +type Flag struct { + Module string `protobuf:"bytes,1,opt,name=Module,proto3" json:"Module,omitempty"` + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + Set bool `protobuf:"varint,3,opt,name=Set,proto3" json:"Set,omitempty"` +} + +func (m *Flag) Reset() { *m = Flag{} } +func (m *Flag) String() string { return proto.CompactTextString(m) } +func (*Flag) ProtoMessage() {} +func (*Flag) Descriptor() ([]byte, []int) { + return fileDescriptor_b9a028c5a375b1b4, []int{0} +} +func (m *Flag) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Flag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Flag.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 *Flag) XXX_Merge(src proto.Message) { + xxx_messageInfo_Flag.Merge(m, src) +} +func (m *Flag) XXX_Size() int { + return m.Size() +} +func (m *Flag) XXX_DiscardUnknown() { + xxx_messageInfo_Flag.DiscardUnknown(m) +} + +var xxx_messageInfo_Flag proto.InternalMessageInfo + +func (m *Flag) GetModule() string { + if m != nil { + return m.Module + } + return "" +} + +func (m *Flag) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Flag) GetSet() bool { + if m != nil { + return m.Set + } + return false +} + +func init() { + proto.RegisterType((*Flag)(nil), "cardchain.featureflag.Flag") +} + +func init() { proto.RegisterFile("cardchain/featureflag/flag.proto", fileDescriptor_b9a028c5a375b1b4) } + +var fileDescriptor_b9a028c5a375b1b4 = []byte{ + // 193 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0x4e, 0x2c, 0x4a, + 0x49, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x4f, 0x4b, 0x4d, 0x2c, 0x29, 0x2d, 0x4a, 0x4d, 0xcb, 0x49, + 0x4c, 0xd7, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xa2, 0x70, 0x15, 0x7a, 0x48, + 0x2a, 0x94, 0x5c, 0xb8, 0x58, 0xdc, 0x72, 0x12, 0xd3, 0x85, 0xc4, 0xb8, 0xd8, 0x7c, 0xf3, 0x53, + 0x4a, 0x73, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xa0, 0x3c, 0x21, 0x21, 0x2e, 0x16, + 0xbf, 0xc4, 0xdc, 0x54, 0x09, 0x26, 0xb0, 0x28, 0x98, 0x2d, 0x24, 0xc0, 0xc5, 0x1c, 0x9c, 0x5a, + 0x22, 0xc1, 0xac, 0xc0, 0xa8, 0xc1, 0x11, 0x04, 0x62, 0x3a, 0x85, 0x9c, 0x78, 0x24, 0xc7, 0x78, + 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, + 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x55, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, + 0xae, 0xbe, 0x4b, 0x6a, 0x72, 0x6a, 0x5e, 0x49, 0x51, 0x62, 0x8e, 0x73, 0x62, 0x51, 0x8a, 0x7b, + 0x62, 0x6e, 0xaa, 0x3e, 0xc2, 0xd5, 0x15, 0x28, 0xee, 0x2e, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, + 0x03, 0xbb, 0xdc, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xef, 0x6b, 0x50, 0xb9, 0xdd, 0x00, 0x00, + 0x00, +} + +func (m *Flag) 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 *Flag) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Flag) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Set { + i-- + if m.Set { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintFlag(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Module) > 0 { + i -= len(m.Module) + copy(dAtA[i:], m.Module) + i = encodeVarintFlag(dAtA, i, uint64(len(m.Module))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFlag(dAtA []byte, offset int, v uint64) int { + offset -= sovFlag(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Flag) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Module) + if l > 0 { + n += 1 + l + sovFlag(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovFlag(uint64(l)) + } + if m.Set { + n += 2 + } + return n +} + +func sovFlag(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFlag(x uint64) (n int) { + return sovFlag(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Flag) 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 ErrIntOverflowFlag + } + 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: Flag: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Flag: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFlag + } + 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 ErrInvalidLengthFlag + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFlag + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Module = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFlag + } + 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 ErrInvalidLengthFlag + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFlag + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFlag + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Set = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipFlag(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFlag + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFlag(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, ErrIntOverflowFlag + } + 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, ErrIntOverflowFlag + } + 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, ErrIntOverflowFlag + } + 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, ErrInvalidLengthFlag + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFlag + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFlag + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFlag = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFlag = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFlag = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/featureflag/types/genesis.go b/x/featureflag/types/genesis.go new file mode 100644 index 00000000..2c15cd92 --- /dev/null +++ b/x/featureflag/types/genesis.go @@ -0,0 +1,22 @@ +package types + +// this line is used by starport scaffolding # genesis/types/import + +// DefaultIndex is the default global index +const DefaultIndex uint64 = 1 + +// DefaultGenesis returns the default genesis state +func DefaultGenesis() *GenesisState { + return &GenesisState{ + // this line is used by starport scaffolding # genesis/types/default + Params: DefaultParams(), + } +} + +// Validate performs basic genesis state validation returning an error upon any +// failure. +func (gs GenesisState) Validate() error { + // this line is used by starport scaffolding # genesis/types/validate + + return gs.Params.Validate() +} diff --git a/x/featureflag/types/genesis.pb.go b/x/featureflag/types/genesis.pb.go new file mode 100644 index 00000000..da869d10 --- /dev/null +++ b/x/featureflag/types/genesis.pb.go @@ -0,0 +1,509 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cardchain/featureflag/genesis.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 + +// GenesisState defines the featureflag module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Flags map[string]*Flag `protobuf:"bytes,2,rep,name=flags,proto3" json:"flags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +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_f8a32dc81c7a3cc4, []int{0} +} +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) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetFlags() map[string]*Flag { + if m != nil { + return m.Flags + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "cardchain.featureflag.GenesisState") + proto.RegisterMapType((map[string]*Flag)(nil), "cardchain.featureflag.GenesisState.FlagsEntry") +} + +func init() { + proto.RegisterFile("cardchain/featureflag/genesis.proto", fileDescriptor_f8a32dc81c7a3cc4) +} + +var fileDescriptor_f8a32dc81c7a3cc4 = []byte{ + // 311 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0x4e, 0x2c, 0x4a, + 0x49, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x4f, 0x4b, 0x4d, 0x2c, 0x29, 0x2d, 0x4a, 0x4d, 0xcb, 0x49, + 0x4c, 0xd7, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x12, 0x85, 0x2b, 0xd2, 0x43, 0x52, 0x24, 0x25, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, + 0x21, 0x2a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x2a, 0xaa, 0x84, + 0xdd, 0x92, 0x82, 0xc4, 0xa2, 0xc4, 0x5c, 0xa8, 0x1d, 0x52, 0x0a, 0xd8, 0xd5, 0x80, 0x08, 0x88, + 0x0a, 0xa5, 0xb7, 0x8c, 0x5c, 0x3c, 0xee, 0x10, 0x77, 0x05, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x39, + 0x70, 0xb1, 0x41, 0x8c, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd5, 0xc3, 0xea, 0x4e, + 0xbd, 0x00, 0xb0, 0x22, 0x27, 0xce, 0x13, 0xf7, 0xe4, 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, + 0x04, 0xd5, 0x27, 0xe4, 0xc2, 0xc5, 0x0a, 0x52, 0x51, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, + 0xa4, 0x87, 0xc3, 0x00, 0x64, 0x5b, 0xf5, 0xdc, 0x40, 0x1a, 0x5c, 0xf3, 0x4a, 0x8a, 0x2a, 0x83, + 0x20, 0x9a, 0xa5, 0x42, 0xb9, 0xb8, 0x10, 0x82, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x60, + 0x27, 0x71, 0x06, 0x81, 0x98, 0x42, 0x86, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, + 0x60, 0x67, 0x4a, 0xe3, 0xb0, 0x05, 0x64, 0x46, 0x10, 0x44, 0xa5, 0x15, 0x93, 0x05, 0xa3, 0x53, + 0xc8, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, + 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x59, 0xa5, 0x67, 0x96, 0x64, + 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xbb, 0xa4, 0x26, 0xa7, 0xe6, 0x95, 0x14, 0x25, 0xe6, + 0x38, 0x27, 0x16, 0xa5, 0xb8, 0x27, 0xe6, 0xa6, 0xea, 0x23, 0x02, 0xb2, 0x02, 0x25, 0x28, 0x4b, + 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x81, 0x69, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x28, + 0xb5, 0x62, 0x9e, 0xf9, 0x01, 0x00, 0x00, +} + +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 + if len(m.Flags) > 0 { + for k := range m.Flags { + v := m.Flags[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGenesis(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Flags) > 0 { + for k, v := range m.Flags { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovGenesis(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + l + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowGenesis + } + 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 Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Flags == nil { + m.Flags = make(map[string]*Flag) + } + var mapkey string + var mapvalue *Flag + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenesis + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenesis + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Flag{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Flags[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/featureflag/types/genesis_test.go b/x/featureflag/types/genesis_test.go new file mode 100644 index 00000000..f9498e5b --- /dev/null +++ b/x/featureflag/types/genesis_test.go @@ -0,0 +1,41 @@ +package types_test + +import ( + "testing" + + "github.com/DecentralCardGame/cardchain/x/featureflag/types" + "github.com/stretchr/testify/require" +) + +func TestGenesisState_Validate(t *testing.T) { + tests := []struct { + desc string + genState *types.GenesisState + valid bool + }{ + { + desc: "default is valid", + genState: types.DefaultGenesis(), + valid: true, + }, + { + desc: "valid genesis state", + genState: &types.GenesisState{ + + // this line is used by starport scaffolding # types/genesis/validField + }, + valid: true, + }, + // this line is used by starport scaffolding # types/genesis/testcase + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + err := tc.genState.Validate() + if tc.valid { + require.NoError(t, err) + } else { + require.Error(t, err) + } + }) + } +} diff --git a/x/featureflag/types/keys.go b/x/featureflag/types/keys.go new file mode 100644 index 00000000..ef3ecd25 --- /dev/null +++ b/x/featureflag/types/keys.go @@ -0,0 +1,20 @@ +package types + +const ( + // ModuleName defines the module name + ModuleName = "featureflag" + + // StoreKey defines the primary module store key + StoreKey = ModuleName + + // MemStoreKey defines the in-memory store key + MemStoreKey = "mem_featureflag" +) + +var ( + ParamsKey = []byte("p_featureflag") +) + +func KeyPrefix(p string) []byte { + return []byte(p) +} diff --git a/x/featureflag/types/msg_update_params.go b/x/featureflag/types/msg_update_params.go new file mode 100644 index 00000000..e36d023d --- /dev/null +++ b/x/featureflag/types/msg_update_params.go @@ -0,0 +1,21 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var _ sdk.Msg = &MsgUpdateParams{} + +// ValidateBasic does a sanity check on the provided data. +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return errorsmod.Wrap(err, "invalid authority address") + } + + if err := m.Params.Validate(); err != nil { + return err + } + + return nil +} diff --git a/x/featureflag/types/params.go b/x/featureflag/types/params.go new file mode 100644 index 00000000..4f3215e3 --- /dev/null +++ b/x/featureflag/types/params.go @@ -0,0 +1,32 @@ +package types + +import ( + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +// ParamKeyTable the param key table for launch module +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// NewParams creates a new Params instance +func NewParams() Params { + return Params{} +} + +// DefaultParams returns a default set of parameters +func DefaultParams() Params { + return NewParams() +} + +// ParamSetPairs get the params.ParamSet +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{} +} + +// Validate validates the set of params +func (p Params) Validate() error { + return nil +} diff --git a/x/featureflag/types/params.pb.go b/x/featureflag/types/params.pb.go new file mode 100644 index 00000000..46dbabd7 --- /dev/null +++ b/x/featureflag/types/params.pb.go @@ -0,0 +1,291 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cardchain/featureflag/params.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 parameters for the module. +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_c9ce917ea43e1573, []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 + +func init() { + proto.RegisterType((*Params)(nil), "cardchain.featureflag.Params") +} + +func init() { + proto.RegisterFile("cardchain/featureflag/params.proto", fileDescriptor_c9ce917ea43e1573) +} + +var fileDescriptor_c9ce917ea43e1573 = []byte{ + // 188 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0x4e, 0x2c, 0x4a, + 0x49, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x4f, 0x4b, 0x4d, 0x2c, 0x29, 0x2d, 0x4a, 0x4d, 0xcb, 0x49, + 0x4c, 0xd7, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x85, 0xab, 0xd1, 0x43, 0x52, 0x23, 0x25, 0x98, 0x98, 0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, + 0x2a, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x22, 0xaa, 0x64, 0xc8, + 0xc5, 0x16, 0x00, 0x36, 0xcf, 0x4a, 0xfd, 0xc5, 0x02, 0x79, 0xc6, 0xae, 0xe7, 0x1b, 0xb4, 0xe4, + 0x10, 0xd6, 0x56, 0xa0, 0x58, 0x0c, 0x51, 0xe8, 0x14, 0x72, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, + 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, + 0xc7, 0x72, 0x0c, 0x51, 0x56, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, + 0x2e, 0xa9, 0xc9, 0xa9, 0x79, 0x25, 0x45, 0x89, 0x39, 0xce, 0x89, 0x45, 0x29, 0xee, 0x89, 0xb9, + 0xa9, 0xfa, 0xb8, 0x8c, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xbb, 0xc7, 0x18, 0x10, + 0x00, 0x00, 0xff, 0xff, 0xdb, 0xe3, 0x32, 0x60, 0xf5, 0x00, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +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 encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(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 sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(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 ErrIntOverflowParams + } + 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 := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/featureflag/types/query.pb.go b/x/featureflag/types/query.pb.go new file mode 100644 index 00000000..2ec990b9 --- /dev/null +++ b/x/featureflag/types/query.pb.go @@ -0,0 +1,541 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cardchain/featureflag/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "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 + +// QueryParamsRequest is 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_fb461e75899978b4, []int{0} +} +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 response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this 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_fb461e75899978b4, []int{1} +} +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((*QueryParamsRequest)(nil), "cardchain.featureflag.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cardchain.featureflag.QueryParamsResponse") +} + +func init() { proto.RegisterFile("cardchain/featureflag/query.proto", fileDescriptor_fb461e75899978b4) } + +var fileDescriptor_fb461e75899978b4 = []byte{ + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4b, 0xc3, 0x40, + 0x14, 0xc7, 0x73, 0x82, 0x05, 0xe3, 0x64, 0xac, 0x20, 0x45, 0xa3, 0x66, 0xd2, 0x0e, 0x39, 0x5a, + 0x07, 0xc1, 0x49, 0xaa, 0xe0, 0xaa, 0x45, 0x10, 0xdc, 0x5e, 0xd2, 0xd7, 0x6b, 0xa0, 0xb9, 0x97, + 0xde, 0x5d, 0xc4, 0xae, 0x7e, 0x02, 0xc1, 0xc5, 0xd9, 0xc9, 0xd1, 0x8f, 0xd1, 0xb1, 0xe0, 0xe2, + 0x24, 0xd2, 0x0a, 0x7e, 0x0d, 0x69, 0x12, 0xc4, 0x62, 0x2d, 0x2e, 0xc7, 0xe3, 0xdd, 0xef, 0xfd, + 0xee, 0x7f, 0xcf, 0xde, 0x09, 0x41, 0xb5, 0xc2, 0x0e, 0x44, 0x92, 0xb7, 0x11, 0x4c, 0xaa, 0xb0, + 0xdd, 0x05, 0xc1, 0x7b, 0x29, 0xaa, 0xbe, 0x9f, 0x28, 0x32, 0xe4, 0xac, 0x7d, 0x23, 0xfe, 0x0f, + 0xa4, 0xb2, 0x02, 0x71, 0x24, 0x89, 0x67, 0x67, 0x4e, 0x56, 0xca, 0x82, 0x04, 0x65, 0x25, 0x9f, + 0x54, 0x45, 0x77, 0x43, 0x10, 0x89, 0x2e, 0x72, 0x48, 0x22, 0x0e, 0x52, 0x92, 0x01, 0x13, 0x91, + 0xd4, 0xc5, 0x6d, 0x35, 0x24, 0x1d, 0x93, 0xe6, 0x01, 0x68, 0xcc, 0x9f, 0xe5, 0xd7, 0xb5, 0x00, + 0x0d, 0xd4, 0x78, 0x02, 0x22, 0x92, 0x19, 0x5c, 0xb0, 0xde, 0xec, 0xb0, 0x09, 0x28, 0x88, 0x0b, + 0x9f, 0x57, 0xb6, 0x9d, 0xf3, 0x89, 0xe5, 0x2c, 0x6b, 0x36, 0xb1, 0x97, 0xa2, 0x36, 0xde, 0xa5, + 0xbd, 0x3a, 0xd5, 0xd5, 0x09, 0x49, 0x8d, 0xce, 0x91, 0x5d, 0xca, 0x87, 0xd7, 0xd9, 0x36, 0xdb, + 0x5d, 0xae, 0x6f, 0xfa, 0x33, 0xff, 0xea, 0xe7, 0x63, 0x8d, 0xa5, 0xc1, 0xdb, 0x96, 0xf5, 0xf4, + 0xf9, 0x5c, 0x65, 0xcd, 0x62, 0xae, 0xfe, 0xc8, 0xec, 0xc5, 0xcc, 0xec, 0x3c, 0x30, 0xbb, 0x94, + 0x73, 0xce, 0xde, 0x1f, 0x9a, 0xdf, 0xc1, 0x2a, 0xd5, 0xff, 0xa0, 0x79, 0x5a, 0xef, 0xe0, 0xf6, + 0xe5, 0xe3, 0x7e, 0xa1, 0xe6, 0x70, 0x7e, 0x82, 0x21, 0x4a, 0xa3, 0xa0, 0x7b, 0x0c, 0xaa, 0x75, + 0x0a, 0x31, 0xf2, 0x79, 0x9b, 0x69, 0x5c, 0x0c, 0x46, 0x2e, 0x1b, 0x8e, 0x5c, 0xf6, 0x3e, 0x72, + 0xd9, 0xdd, 0xd8, 0xb5, 0x86, 0x63, 0xd7, 0x7a, 0x1d, 0xbb, 0xd6, 0xd5, 0xa1, 0x88, 0x4c, 0x27, + 0x0d, 0xfc, 0x90, 0xe2, 0xb9, 0xd2, 0x9b, 0x29, 0xad, 0xe9, 0x27, 0xa8, 0x83, 0x52, 0xb6, 0xf0, + 0xfd, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0xc7, 0xde, 0x6c, 0x43, 0x02, 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 { + // Parameters queries the parameters of the module. + 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) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cardchain.featureflag.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 { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +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_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: "/cardchain.featureflag.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 = _Query_serviceDesc +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cardchain.featureflag.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cardchain/featureflag/query.proto", +} + +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 *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 *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/featureflag/types/query.pb.gw.go b/x/featureflag/types/query.pb.gw.go new file mode 100644 index 00000000..61698ff0 --- /dev/null +++ b/x/featureflag/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cardchain/featureflag/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_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_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_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_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"DecentralCardGame", "cardchain", "featureflag", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/featureflag/types/tx.pb.go b/x/featureflag/types/tx.pb.go new file mode 100644 index 00000000..af61eaab --- /dev/null +++ b/x/featureflag/types/tx.pb.go @@ -0,0 +1,600 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cardchain/featureflag/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 + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov 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_b6585a6310f99dc0, []int{0} +} +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_b6585a6310f99dc0, []int{1} +} +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((*MsgUpdateParams)(nil), "cardchain.featureflag.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cardchain.featureflag.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("cardchain/featureflag/tx.proto", fileDescriptor_b6585a6310f99dc0) } + +var fileDescriptor_b6585a6310f99dc0 = []byte{ + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0x4e, 0x2c, 0x4a, + 0x49, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x4f, 0x4b, 0x4d, 0x2c, 0x29, 0x2d, 0x4a, 0x4d, 0xcb, 0x49, + 0x4c, 0xd7, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, 0xcb, 0xeb, 0x21, + 0xc9, 0x4b, 0x09, 0x26, 0xe6, 0x66, 0xe6, 0xe5, 0xeb, 0x83, 0x49, 0x88, 0x4a, 0x29, 0xf1, 0xe4, + 0xfc, 0xe2, 0xdc, 0xfc, 0x62, 0xfd, 0xdc, 0xe2, 0x74, 0xfd, 0x32, 0x43, 0x10, 0x05, 0x95, 0x90, + 0x84, 0x48, 0xc4, 0x83, 0x79, 0xfa, 0x10, 0x0e, 0x54, 0x4a, 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0x22, + 0x0e, 0x62, 0x41, 0x45, 0x95, 0xb0, 0xbb, 0xa9, 0x20, 0xb1, 0x28, 0x31, 0x17, 0xaa, 0x53, 0xe9, + 0x38, 0x23, 0x17, 0xbf, 0x6f, 0x71, 0x7a, 0x68, 0x41, 0x4a, 0x62, 0x49, 0x6a, 0x00, 0x58, 0x46, + 0xc8, 0x8c, 0x8b, 0x33, 0xb1, 0xb4, 0x24, 0x23, 0xbf, 0x28, 0xb3, 0xa4, 0x52, 0x82, 0x51, 0x81, + 0x51, 0x83, 0xd3, 0x49, 0xe2, 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0x95, 0x8e, 0x29, 0x29, 0x45, 0xa9, + 0xc5, 0xc5, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x41, 0x08, 0xa5, 0x42, 0x0e, 0x5c, 0x6c, 0x10, + 0xb3, 0x25, 0x98, 0x14, 0x18, 0x35, 0xb8, 0x8d, 0x64, 0xf5, 0xb0, 0x7a, 0x5a, 0x0f, 0x62, 0x8d, + 0x13, 0xe7, 0x89, 0x7b, 0xf2, 0x0c, 0x2b, 0x9e, 0x6f, 0xd0, 0x62, 0x0c, 0x82, 0xea, 0xb3, 0xb2, + 0x6a, 0x7a, 0xbe, 0x41, 0x0b, 0x61, 0x62, 0xd7, 0xf3, 0x0d, 0x5a, 0xea, 0x08, 0x4f, 0x54, 0xa0, + 0x78, 0x03, 0xcd, 0xd5, 0x4a, 0x92, 0x5c, 0xe2, 0x68, 0x42, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, + 0xc5, 0xa9, 0x46, 0x25, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0x69, 0x5c, 0x3c, 0x28, 0xfe, 0x54, + 0xc3, 0xe1, 0x3e, 0x34, 0x63, 0xa4, 0xf4, 0x88, 0x53, 0x07, 0xb3, 0x4e, 0x8a, 0xb5, 0x01, 0xe4, + 0x29, 0xa7, 0x90, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, + 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xb2, 0x4a, 0xcf, + 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x77, 0x49, 0x4d, 0x4e, 0xcd, 0x2b, 0x29, + 0x4a, 0xcc, 0x71, 0x4e, 0x2c, 0x4a, 0x71, 0x4f, 0xcc, 0x4d, 0xd5, 0xc7, 0xe5, 0xe1, 0x92, 0xca, + 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0xbc, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x68, + 0x9e, 0x27, 0x71, 0x02, 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 { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + 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) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cardchain.featureflag.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 { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +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_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: "/cardchain.featureflag.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 = _Msg_serviceDesc +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cardchain.featureflag.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cardchain/featureflag/tx.proto", +} + +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 *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 *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/featureflag/types/types.go b/x/featureflag/types/types.go new file mode 100644 index 00000000..ab1254f4 --- /dev/null +++ b/x/featureflag/types/types.go @@ -0,0 +1 @@ +package types