diff --git a/api/nova/airdrop/v1/genesis.pulsar.go b/api/nova/airdrop/v1/genesis.pulsar.go index 0f78445c..b63f9243 100644 --- a/api/nova/airdrop/v1/genesis.pulsar.go +++ b/api/nova/airdrop/v1/genesis.pulsar.go @@ -68,16 +68,16 @@ func (x *_GenesisState_2_list) IsValid() bool { } var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_states protoreflect.FieldDescriptor + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_states protoreflect.FieldDescriptor + fd_GenesisState_airdrop_info protoreflect.FieldDescriptor ) func init() { file_nova_airdrop_v1_genesis_proto_init() md_GenesisState = File_nova_airdrop_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_states = md_GenesisState.Fields().ByName("states") + fd_GenesisState_airdrop_info = md_GenesisState.Fields().ByName("airdrop_info") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -145,18 +145,18 @@ func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { // 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.States) != 0 { value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.States}) if !f(fd_GenesisState_states, value) { return } } + if x.AirdropInfo != nil { + value := protoreflect.ValueOfMessage(x.AirdropInfo.ProtoReflect()) + if !f(fd_GenesisState_airdrop_info, value) { + return + } + } } // Has reports whether a field is populated. @@ -172,10 +172,10 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "nova.airdrop.v1.GenesisState.params": - return x.Params != nil case "nova.airdrop.v1.GenesisState.states": return len(x.States) != 0 + case "nova.airdrop.v1.GenesisState.airdrop_info": + return x.AirdropInfo != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.GenesisState")) @@ -192,10 +192,10 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "nova.airdrop.v1.GenesisState.params": - x.Params = nil case "nova.airdrop.v1.GenesisState.states": x.States = nil + case "nova.airdrop.v1.GenesisState.airdrop_info": + x.AirdropInfo = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.GenesisState")) @@ -212,15 +212,15 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "nova.airdrop.v1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) case "nova.airdrop.v1.GenesisState.states": if len(x.States) == 0 { return protoreflect.ValueOfList(&_GenesisState_2_list{}) } listValue := &_GenesisState_2_list{list: &x.States} return protoreflect.ValueOfList(listValue) + case "nova.airdrop.v1.GenesisState.airdrop_info": + value := x.AirdropInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.GenesisState")) @@ -241,12 +241,12 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto // 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 "nova.airdrop.v1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) case "nova.airdrop.v1.GenesisState.states": lv := value.List() clv := lv.(*_GenesisState_2_list) x.States = *clv.list + case "nova.airdrop.v1.GenesisState.airdrop_info": + x.AirdropInfo = value.Message().Interface().(*AirdropInfo) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.GenesisState")) @@ -267,17 +267,17 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "nova.airdrop.v1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "nova.airdrop.v1.GenesisState.states": if x.States == nil { x.States = []*AirdropState{} } value := &_GenesisState_2_list{list: &x.States} return protoreflect.ValueOfList(value) + case "nova.airdrop.v1.GenesisState.airdrop_info": + if x.AirdropInfo == nil { + x.AirdropInfo = new(AirdropInfo) + } + return protoreflect.ValueOfMessage(x.AirdropInfo.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.GenesisState")) @@ -291,12 +291,12 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p // 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 "nova.airdrop.v1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) case "nova.airdrop.v1.GenesisState.states": list := []*AirdropState{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) + case "nova.airdrop.v1.GenesisState.airdrop_info": + m := new(AirdropInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.GenesisState")) @@ -366,16 +366,16 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { 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.States) > 0 { for _, e := range x.States { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } + if x.AirdropInfo != nil { + l = options.Size(x.AirdropInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -405,6 +405,20 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.AirdropInfo != nil { + encoded, err := options.Marshal(x.AirdropInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } if len(x.States) > 0 { for iNdEx := len(x.States) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.States[iNdEx]) @@ -421,20 +435,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x12 } } - 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 { @@ -465,28 +465,744 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } - if iNdEx >= l { + 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 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field States", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.States = append(x.States, &AirdropState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.States[len(x.States)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AirdropInfo", 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.AirdropInfo == nil { + x.AirdropInfo = &AirdropInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AirdropInfo); 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_AirdropInfo protoreflect.MessageDescriptor + fd_AirdropInfo_snapshot_timestamp protoreflect.FieldDescriptor + fd_AirdropInfo_airdrop_start_timestamp protoreflect.FieldDescriptor + fd_AirdropInfo_airdrop_end_timestamp protoreflect.FieldDescriptor + fd_AirdropInfo_airdrop_denom protoreflect.FieldDescriptor + fd_AirdropInfo_quests_count protoreflect.FieldDescriptor + fd_AirdropInfo_controller_address protoreflect.FieldDescriptor + fd_AirdropInfo_maximum_token_alloc_per_user protoreflect.FieldDescriptor +) + +func init() { + file_nova_airdrop_v1_genesis_proto_init() + md_AirdropInfo = File_nova_airdrop_v1_genesis_proto.Messages().ByName("AirdropInfo") + fd_AirdropInfo_snapshot_timestamp = md_AirdropInfo.Fields().ByName("snapshot_timestamp") + fd_AirdropInfo_airdrop_start_timestamp = md_AirdropInfo.Fields().ByName("airdrop_start_timestamp") + fd_AirdropInfo_airdrop_end_timestamp = md_AirdropInfo.Fields().ByName("airdrop_end_timestamp") + fd_AirdropInfo_airdrop_denom = md_AirdropInfo.Fields().ByName("airdrop_denom") + fd_AirdropInfo_quests_count = md_AirdropInfo.Fields().ByName("quests_count") + fd_AirdropInfo_controller_address = md_AirdropInfo.Fields().ByName("controller_address") + fd_AirdropInfo_maximum_token_alloc_per_user = md_AirdropInfo.Fields().ByName("maximum_token_alloc_per_user") +} + +var _ protoreflect.Message = (*fastReflection_AirdropInfo)(nil) + +type fastReflection_AirdropInfo AirdropInfo + +func (x *AirdropInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AirdropInfo)(x) +} + +func (x *AirdropInfo) slowProtoReflect() protoreflect.Message { + mi := &file_nova_airdrop_v1_genesis_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_AirdropInfo_messageType fastReflection_AirdropInfo_messageType +var _ protoreflect.MessageType = fastReflection_AirdropInfo_messageType{} + +type fastReflection_AirdropInfo_messageType struct{} + +func (x fastReflection_AirdropInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AirdropInfo)(nil) +} +func (x fastReflection_AirdropInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AirdropInfo) +} +func (x fastReflection_AirdropInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AirdropInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AirdropInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AirdropInfo +} + +// 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_AirdropInfo) Type() protoreflect.MessageType { + return _fastReflection_AirdropInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AirdropInfo) New() protoreflect.Message { + return new(fastReflection_AirdropInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AirdropInfo) Interface() protoreflect.ProtoMessage { + return (*AirdropInfo)(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_AirdropInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SnapshotTimestamp != nil { + value := protoreflect.ValueOfMessage(x.SnapshotTimestamp.ProtoReflect()) + if !f(fd_AirdropInfo_snapshot_timestamp, value) { + return + } + } + if x.AirdropStartTimestamp != nil { + value := protoreflect.ValueOfMessage(x.AirdropStartTimestamp.ProtoReflect()) + if !f(fd_AirdropInfo_airdrop_start_timestamp, value) { + return + } + } + if x.AirdropEndTimestamp != nil { + value := protoreflect.ValueOfMessage(x.AirdropEndTimestamp.ProtoReflect()) + if !f(fd_AirdropInfo_airdrop_end_timestamp, value) { + return + } + } + if x.AirdropDenom != "" { + value := protoreflect.ValueOfString(x.AirdropDenom) + if !f(fd_AirdropInfo_airdrop_denom, value) { + return + } + } + if x.QuestsCount != int32(0) { + value := protoreflect.ValueOfInt32(x.QuestsCount) + if !f(fd_AirdropInfo_quests_count, value) { + return + } + } + if x.ControllerAddress != "" { + value := protoreflect.ValueOfString(x.ControllerAddress) + if !f(fd_AirdropInfo_controller_address, value) { + return + } + } + if x.MaximumTokenAllocPerUser != "" { + value := protoreflect.ValueOfString(x.MaximumTokenAllocPerUser) + if !f(fd_AirdropInfo_maximum_token_alloc_per_user, 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_AirdropInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "nova.airdrop.v1.AirdropInfo.snapshot_timestamp": + return x.SnapshotTimestamp != nil + case "nova.airdrop.v1.AirdropInfo.airdrop_start_timestamp": + return x.AirdropStartTimestamp != nil + case "nova.airdrop.v1.AirdropInfo.airdrop_end_timestamp": + return x.AirdropEndTimestamp != nil + case "nova.airdrop.v1.AirdropInfo.airdrop_denom": + return x.AirdropDenom != "" + case "nova.airdrop.v1.AirdropInfo.quests_count": + return x.QuestsCount != int32(0) + case "nova.airdrop.v1.AirdropInfo.controller_address": + return x.ControllerAddress != "" + case "nova.airdrop.v1.AirdropInfo.maximum_token_alloc_per_user": + return x.MaximumTokenAllocPerUser != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.AirdropInfo")) + } + panic(fmt.Errorf("message nova.airdrop.v1.AirdropInfo 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_AirdropInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "nova.airdrop.v1.AirdropInfo.snapshot_timestamp": + x.SnapshotTimestamp = nil + case "nova.airdrop.v1.AirdropInfo.airdrop_start_timestamp": + x.AirdropStartTimestamp = nil + case "nova.airdrop.v1.AirdropInfo.airdrop_end_timestamp": + x.AirdropEndTimestamp = nil + case "nova.airdrop.v1.AirdropInfo.airdrop_denom": + x.AirdropDenom = "" + case "nova.airdrop.v1.AirdropInfo.quests_count": + x.QuestsCount = int32(0) + case "nova.airdrop.v1.AirdropInfo.controller_address": + x.ControllerAddress = "" + case "nova.airdrop.v1.AirdropInfo.maximum_token_alloc_per_user": + x.MaximumTokenAllocPerUser = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.AirdropInfo")) + } + panic(fmt.Errorf("message nova.airdrop.v1.AirdropInfo 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_AirdropInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "nova.airdrop.v1.AirdropInfo.snapshot_timestamp": + value := x.SnapshotTimestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_start_timestamp": + value := x.AirdropStartTimestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_end_timestamp": + value := x.AirdropEndTimestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_denom": + value := x.AirdropDenom + return protoreflect.ValueOfString(value) + case "nova.airdrop.v1.AirdropInfo.quests_count": + value := x.QuestsCount + return protoreflect.ValueOfInt32(value) + case "nova.airdrop.v1.AirdropInfo.controller_address": + value := x.ControllerAddress + return protoreflect.ValueOfString(value) + case "nova.airdrop.v1.AirdropInfo.maximum_token_alloc_per_user": + value := x.MaximumTokenAllocPerUser + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.AirdropInfo")) + } + panic(fmt.Errorf("message nova.airdrop.v1.AirdropInfo 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_AirdropInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "nova.airdrop.v1.AirdropInfo.snapshot_timestamp": + x.SnapshotTimestamp = value.Message().Interface().(*timestamppb.Timestamp) + case "nova.airdrop.v1.AirdropInfo.airdrop_start_timestamp": + x.AirdropStartTimestamp = value.Message().Interface().(*timestamppb.Timestamp) + case "nova.airdrop.v1.AirdropInfo.airdrop_end_timestamp": + x.AirdropEndTimestamp = value.Message().Interface().(*timestamppb.Timestamp) + case "nova.airdrop.v1.AirdropInfo.airdrop_denom": + x.AirdropDenom = value.Interface().(string) + case "nova.airdrop.v1.AirdropInfo.quests_count": + x.QuestsCount = int32(value.Int()) + case "nova.airdrop.v1.AirdropInfo.controller_address": + x.ControllerAddress = value.Interface().(string) + case "nova.airdrop.v1.AirdropInfo.maximum_token_alloc_per_user": + x.MaximumTokenAllocPerUser = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.AirdropInfo")) + } + panic(fmt.Errorf("message nova.airdrop.v1.AirdropInfo 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_AirdropInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "nova.airdrop.v1.AirdropInfo.snapshot_timestamp": + if x.SnapshotTimestamp == nil { + x.SnapshotTimestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.SnapshotTimestamp.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_start_timestamp": + if x.AirdropStartTimestamp == nil { + x.AirdropStartTimestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.AirdropStartTimestamp.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_end_timestamp": + if x.AirdropEndTimestamp == nil { + x.AirdropEndTimestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.AirdropEndTimestamp.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_denom": + panic(fmt.Errorf("field airdrop_denom of message nova.airdrop.v1.AirdropInfo is not mutable")) + case "nova.airdrop.v1.AirdropInfo.quests_count": + panic(fmt.Errorf("field quests_count of message nova.airdrop.v1.AirdropInfo is not mutable")) + case "nova.airdrop.v1.AirdropInfo.controller_address": + panic(fmt.Errorf("field controller_address of message nova.airdrop.v1.AirdropInfo is not mutable")) + case "nova.airdrop.v1.AirdropInfo.maximum_token_alloc_per_user": + panic(fmt.Errorf("field maximum_token_alloc_per_user of message nova.airdrop.v1.AirdropInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.AirdropInfo")) + } + panic(fmt.Errorf("message nova.airdrop.v1.AirdropInfo 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_AirdropInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "nova.airdrop.v1.AirdropInfo.snapshot_timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_start_timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_end_timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "nova.airdrop.v1.AirdropInfo.airdrop_denom": + return protoreflect.ValueOfString("") + case "nova.airdrop.v1.AirdropInfo.quests_count": + return protoreflect.ValueOfInt32(int32(0)) + case "nova.airdrop.v1.AirdropInfo.controller_address": + return protoreflect.ValueOfString("") + case "nova.airdrop.v1.AirdropInfo.maximum_token_alloc_per_user": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.AirdropInfo")) + } + panic(fmt.Errorf("message nova.airdrop.v1.AirdropInfo 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_AirdropInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in nova.airdrop.v1.AirdropInfo", 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_AirdropInfo) 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_AirdropInfo) 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_AirdropInfo) 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_AirdropInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AirdropInfo) + 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.SnapshotTimestamp != nil { + l = options.Size(x.SnapshotTimestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.AirdropStartTimestamp != nil { + l = options.Size(x.AirdropStartTimestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.AirdropEndTimestamp != nil { + l = options.Size(x.AirdropEndTimestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AirdropDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.QuestsCount != 0 { + n += 1 + runtime.Sov(uint64(x.QuestsCount)) + } + l = len(x.ControllerAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaximumTokenAllocPerUser) + 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().(*AirdropInfo) + 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.MaximumTokenAllocPerUser) > 0 { + i -= len(x.MaximumTokenAllocPerUser) + copy(dAtA[i:], x.MaximumTokenAllocPerUser) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaximumTokenAllocPerUser))) + i-- + dAtA[i] = 0x3a + } + if len(x.ControllerAddress) > 0 { + i -= len(x.ControllerAddress) + copy(dAtA[i:], x.ControllerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerAddress))) + i-- + dAtA[i] = 0x32 + } + if x.QuestsCount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.QuestsCount)) + i-- + dAtA[i] = 0x28 + } + if len(x.AirdropDenom) > 0 { + i -= len(x.AirdropDenom) + copy(dAtA[i:], x.AirdropDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AirdropDenom))) + i-- + dAtA[i] = 0x22 + } + if x.AirdropEndTimestamp != nil { + encoded, err := options.Marshal(x.AirdropEndTimestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.AirdropStartTimestamp != nil { + encoded, err := options.Marshal(x.AirdropStartTimestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.SnapshotTimestamp != nil { + encoded, err := options.Marshal(x.SnapshotTimestamp) + 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().(*AirdropInfo) + 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: AirdropInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AirdropInfo: 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 SnapshotTimestamp", 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 } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if x.SnapshotTimestamp == nil { + x.SnapshotTimestamp = ×tamppb.Timestamp{} } - } - 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 err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SnapshotTimestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AirdropStartTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -513,16 +1229,16 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Params == nil { - x.Params = &Params{} + if x.AirdropStartTimestamp == nil { + x.AirdropStartTimestamp = ×tamppb.Timestamp{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AirdropStartTimestamp); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field States", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AirdropEndTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -549,11 +1265,128 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.States = append(x.States, &AirdropState{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.States[len(x.States)-1]); err != nil { + if x.AirdropEndTimestamp == nil { + x.AirdropEndTimestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AirdropEndTimestamp); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AirdropDenom", 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.AirdropDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QuestsCount", wireType) + } + x.QuestsCount = 0 + 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++ + x.QuestsCount |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerAddress", 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.ControllerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumTokenAllocPerUser", 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.MaximumTokenAllocPerUser = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -703,7 +1536,7 @@ func (x *AirdropState) ProtoReflect() protoreflect.Message { } func (x *AirdropState) slowProtoReflect() protoreflect.Message { - mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[1] + mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1386,10 +2219,11 @@ func (x *fastReflection_AirdropState) ProtoMethods() *protoiface.Methods { } var ( - md_QuestState protoreflect.MessageDescriptor - fd_QuestState_state protoreflect.FieldDescriptor - fd_QuestState_achieved_at protoreflect.FieldDescriptor - fd_QuestState_claimed_at protoreflect.FieldDescriptor + md_QuestState protoreflect.MessageDescriptor + fd_QuestState_state protoreflect.FieldDescriptor + fd_QuestState_achieved_at protoreflect.FieldDescriptor + fd_QuestState_claimed_at protoreflect.FieldDescriptor + fd_QuestState_claimed_amount protoreflect.FieldDescriptor ) func init() { @@ -1398,6 +2232,7 @@ func init() { fd_QuestState_state = md_QuestState.Fields().ByName("state") fd_QuestState_achieved_at = md_QuestState.Fields().ByName("achieved_at") fd_QuestState_claimed_at = md_QuestState.Fields().ByName("claimed_at") + fd_QuestState_claimed_amount = md_QuestState.Fields().ByName("claimed_amount") } var _ protoreflect.Message = (*fastReflection_QuestState)(nil) @@ -1409,7 +2244,7 @@ func (x *QuestState) ProtoReflect() protoreflect.Message { } func (x *QuestState) slowProtoReflect() protoreflect.Message { - mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[2] + mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1483,6 +2318,12 @@ func (x *fastReflection_QuestState) Range(f func(protoreflect.FieldDescriptor, p return } } + if x.ClaimedAmount != "" { + value := protoreflect.ValueOfString(x.ClaimedAmount) + if !f(fd_QuestState_claimed_amount, value) { + return + } + } } // Has reports whether a field is populated. @@ -1504,6 +2345,8 @@ func (x *fastReflection_QuestState) Has(fd protoreflect.FieldDescriptor) bool { return x.AchievedAt != nil case "nova.airdrop.v1.QuestState.claimed_at": return x.ClaimedAt != nil + case "nova.airdrop.v1.QuestState.claimed_amount": + return x.ClaimedAmount != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QuestState")) @@ -1526,6 +2369,8 @@ func (x *fastReflection_QuestState) Clear(fd protoreflect.FieldDescriptor) { x.AchievedAt = nil case "nova.airdrop.v1.QuestState.claimed_at": x.ClaimedAt = nil + case "nova.airdrop.v1.QuestState.claimed_amount": + x.ClaimedAmount = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QuestState")) @@ -1551,6 +2396,9 @@ func (x *fastReflection_QuestState) Get(descriptor protoreflect.FieldDescriptor) case "nova.airdrop.v1.QuestState.claimed_at": value := x.ClaimedAt return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "nova.airdrop.v1.QuestState.claimed_amount": + value := x.ClaimedAmount + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QuestState")) @@ -1577,6 +2425,8 @@ func (x *fastReflection_QuestState) Set(fd protoreflect.FieldDescriptor, value p x.AchievedAt = value.Message().Interface().(*timestamppb.Timestamp) case "nova.airdrop.v1.QuestState.claimed_at": x.ClaimedAt = value.Message().Interface().(*timestamppb.Timestamp) + case "nova.airdrop.v1.QuestState.claimed_amount": + x.ClaimedAmount = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QuestState")) @@ -1609,6 +2459,8 @@ func (x *fastReflection_QuestState) Mutable(fd protoreflect.FieldDescriptor) pro return protoreflect.ValueOfMessage(x.ClaimedAt.ProtoReflect()) case "nova.airdrop.v1.QuestState.state": panic(fmt.Errorf("field state of message nova.airdrop.v1.QuestState is not mutable")) + case "nova.airdrop.v1.QuestState.claimed_amount": + panic(fmt.Errorf("field claimed_amount of message nova.airdrop.v1.QuestState is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QuestState")) @@ -1630,6 +2482,8 @@ func (x *fastReflection_QuestState) NewField(fd protoreflect.FieldDescriptor) pr case "nova.airdrop.v1.QuestState.claimed_at": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "nova.airdrop.v1.QuestState.claimed_amount": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QuestState")) @@ -1710,6 +2564,10 @@ func (x *fastReflection_QuestState) ProtoMethods() *protoiface.Methods { l = options.Size(x.ClaimedAt) n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.ClaimedAmount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1739,6 +2597,13 @@ func (x *fastReflection_QuestState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.ClaimedAmount) > 0 { + i -= len(x.ClaimedAmount) + copy(dAtA[i:], x.ClaimedAmount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClaimedAmount))) + i-- + dAtA[i] = 0x22 + } if x.ClaimedAt != nil { encoded, err := options.Marshal(x.ClaimedAt) if err != nil { @@ -1912,6 +2777,38 @@ func (x *fastReflection_QuestState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimedAmount", 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.ClaimedAmount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2072,10 +2969,10 @@ type GenesisState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // params defines all the parameters of module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // states for the airdrop, how much coins are allocated for each address is must be pre-defined. States []*AirdropState `protobuf:"bytes,2,rep,name=states,proto3" json:"states,omitempty"` + // information for the airdrop + AirdropInfo *AirdropInfo `protobuf:"bytes,3,opt,name=airdrop_info,json=airdropInfo,proto3" json:"airdrop_info,omitempty"` } func (x *GenesisState) Reset() { @@ -2098,20 +2995,110 @@ func (*GenesisState) Descriptor() ([]byte, []int) { return file_nova_airdrop_v1_genesis_proto_rawDescGZIP(), []int{0} } -func (x *GenesisState) GetParams() *Params { +func (x *GenesisState) GetStates() []*AirdropState { if x != nil { - return x.Params + return x.States } return nil } -func (x *GenesisState) GetStates() []*AirdropState { +func (x *GenesisState) GetAirdropInfo() *AirdropInfo { if x != nil { - return x.States + return x.AirdropInfo + } + return nil +} + +type AirdropInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The snapshot date based for the distribution of the airdrop. + SnapshotTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=snapshot_timestamp,json=snapshotTimestamp,proto3" json:"snapshot_timestamp,omitempty"` + // THe time when you can claim your airdrop nova tokens. + AirdropStartTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=airdrop_start_timestamp,json=airdropStartTimestamp,proto3" json:"airdrop_start_timestamp,omitempty"` + // THe time when the user no longer can claim the airdrop tokens. + AirdropEndTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=airdrop_end_timestamp,json=airdropEndTimestamp,proto3" json:"airdrop_end_timestamp,omitempty"` + // The denom for the airdrop coin. + AirdropDenom string `protobuf:"bytes,4,opt,name=airdrop_denom,json=airdropDenom,proto3" json:"airdrop_denom,omitempty"` + // the number of quests user to do + QuestsCount int32 `protobuf:"varint,5,opt,name=quests_count,json=questsCount,proto3" json:"quests_count,omitempty"` + // controller address is responsible to check the user has performed the social quest (e.g. twitter, facebook or etc) + ControllerAddress string `protobuf:"bytes,6,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"` + // maximum token allocation for each user, an use cannot claim more than this amount; + MaximumTokenAllocPerUser string `protobuf:"bytes,7,opt,name=maximum_token_alloc_per_user,json=maximumTokenAllocPerUser,proto3" json:"maximum_token_alloc_per_user,omitempty"` +} + +func (x *AirdropInfo) Reset() { + *x = AirdropInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AirdropInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AirdropInfo) ProtoMessage() {} + +// Deprecated: Use AirdropInfo.ProtoReflect.Descriptor instead. +func (*AirdropInfo) Descriptor() ([]byte, []int) { + return file_nova_airdrop_v1_genesis_proto_rawDescGZIP(), []int{1} +} + +func (x *AirdropInfo) GetSnapshotTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.SnapshotTimestamp + } + return nil +} + +func (x *AirdropInfo) GetAirdropStartTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.AirdropStartTimestamp + } + return nil +} + +func (x *AirdropInfo) GetAirdropEndTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.AirdropEndTimestamp } return nil } +func (x *AirdropInfo) GetAirdropDenom() string { + if x != nil { + return x.AirdropDenom + } + return "" +} + +func (x *AirdropInfo) GetQuestsCount() int32 { + if x != nil { + return x.QuestsCount + } + return 0 +} + +func (x *AirdropInfo) GetControllerAddress() string { + if x != nil { + return x.ControllerAddress + } + return "" +} + +func (x *AirdropInfo) GetMaximumTokenAllocPerUser() string { + if x != nil { + return x.MaximumTokenAllocPerUser + } + return "" +} + type AirdropState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2128,7 +3115,7 @@ type AirdropState struct { func (x *AirdropState) Reset() { *x = AirdropState{} if protoimpl.UnsafeEnabled { - mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[1] + mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2142,7 +3129,7 @@ func (*AirdropState) ProtoMessage() {} // Deprecated: Use AirdropState.ProtoReflect.Descriptor instead. func (*AirdropState) Descriptor() ([]byte, []int) { - return file_nova_airdrop_v1_genesis_proto_rawDescGZIP(), []int{1} + return file_nova_airdrop_v1_genesis_proto_rawDescGZIP(), []int{2} } func (x *AirdropState) GetRecipient() string { @@ -2177,12 +3164,14 @@ type QuestState struct { AchievedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=achieved_at,json=achievedAt,proto3" json:"achieved_at,omitempty"` // claim_timestamp is the timestamp when the user claimed the amount. ClaimedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=claimed_at,json=claimedAt,proto3" json:"claimed_at,omitempty"` + // claimed amount, this field is empty if user not claimed for this quest yet + ClaimedAmount string `protobuf:"bytes,4,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` } func (x *QuestState) Reset() { *x = QuestState{} if protoimpl.UnsafeEnabled { - mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[2] + mi := &file_nova_airdrop_v1_genesis_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2196,7 +3185,7 @@ func (*QuestState) ProtoMessage() {} // Deprecated: Use QuestState.ProtoReflect.Descriptor instead. func (*QuestState) Descriptor() ([]byte, []int) { - return file_nova_airdrop_v1_genesis_proto_rawDescGZIP(), []int{2} + return file_nova_airdrop_v1_genesis_proto_rawDescGZIP(), []int{3} } func (x *QuestState) GetState() QuestStateType { @@ -2220,84 +3209,122 @@ func (x *QuestState) GetClaimedAt() *timestamppb.Timestamp { return nil } +func (x *QuestState) GetClaimedAmount() string { + if x != nil { + return x.ClaimedAmount + } + return "" +} + var File_nova_airdrop_v1_genesis_proto protoreflect.FileDescriptor var file_nova_airdrop_v1_genesis_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, - 0x1a, 0x1c, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, - 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, - 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x22, 0xff, 0x01, - 0x0a, 0x0c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x51, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, - 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, - 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xcf, 0x01, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, - 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, - 0x52, 0x0a, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x43, 0x0a, 0x0a, - 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, - 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x41, - 0x74, 0x2a, 0x8a, 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x17, 0x0a, 0x13, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x48, 0x49, 0x4e, 0x47, - 0x5f, 0x54, 0x4f, 0x5f, 0x44, 0x4f, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x51, 0x55, 0x45, 0x53, - 0x54, 0x5f, 0x53, 0x4f, 0x43, 0x49, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x51, 0x55, - 0x45, 0x53, 0x54, 0x5f, 0x53, 0x4e, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x43, 0x4c, 0x41, - 0x49, 0x4d, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x50, 0x52, - 0x4f, 0x56, 0x49, 0x44, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x10, - 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x5f, - 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x53, 0x10, 0x04, 0x2a, 0x61, - 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1b, 0x0a, 0x17, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, - 0x15, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x41, - 0x49, 0x4d, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x51, 0x55, 0x45, 0x53, - 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x10, - 0x02, 0x42, 0xbc, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, - 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x61, 0x72, 0x69, 0x6e, 0x61, 0x2d, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, - 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x69, 0x72, 0x64, 0x72, - 0x6f, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x4e, 0x6f, 0x76, - 0x61, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x4e, - 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1b, 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4e, - 0x6f, 0x76, 0x61, 0x3a, 0x3a, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, + 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, + 0x6f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x3f, 0x0a, 0x0c, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, + 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0xd1, 0x03, 0x0a, 0x0b, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x53, 0x0a, 0x12, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, + 0x1f, 0x01, 0x52, 0x11, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x5c, 0x0a, 0x17, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x61, 0x69, + 0x72, 0x64, 0x72, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x58, 0x0a, 0x15, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, + 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x13, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, + 0x70, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, + 0x0d, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x44, 0x65, 0x6e, + 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x50, 0x65, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x22, 0xff, 0x01, 0x0a, 0x0c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, + 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6e, + 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x73, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x10, 0x51, 0x75, 0x65, + 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf6, 0x01, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, + 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x0b, + 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, + 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x41, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x2a, + 0x8a, 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, + 0x13, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x54, + 0x4f, 0x5f, 0x44, 0x4f, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, + 0x53, 0x4f, 0x43, 0x49, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x51, 0x55, 0x45, 0x53, + 0x54, 0x5f, 0x53, 0x4e, 0x5f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, + 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x56, + 0x49, 0x44, 0x45, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x10, 0x03, 0x12, + 0x1b, 0x0a, 0x17, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x4e, + 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x53, 0x10, 0x04, 0x2a, 0x61, 0x0a, 0x0e, + 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, + 0x0a, 0x17, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x51, + 0x55, 0x45, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, + 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x10, 0x02, 0x42, + 0xbc, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, + 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x61, 0x72, 0x69, 0x6e, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, + 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x4e, 0x6f, 0x76, 0x61, 0x2e, + 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x4e, 0x6f, 0x76, + 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x4e, + 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4e, 0x6f, 0x76, + 0x61, 0x3a, 0x3a, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2313,30 +3340,33 @@ func file_nova_airdrop_v1_genesis_proto_rawDescGZIP() []byte { } var file_nova_airdrop_v1_genesis_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_nova_airdrop_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_nova_airdrop_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_nova_airdrop_v1_genesis_proto_goTypes = []interface{}{ (QuestType)(0), // 0: nova.airdrop.v1.QuestType (QuestStateType)(0), // 1: nova.airdrop.v1.QuestStateType (*GenesisState)(nil), // 2: nova.airdrop.v1.GenesisState - (*AirdropState)(nil), // 3: nova.airdrop.v1.AirdropState - (*QuestState)(nil), // 4: nova.airdrop.v1.QuestState - nil, // 5: nova.airdrop.v1.AirdropState.QuestStatesEntry - (*Params)(nil), // 6: nova.airdrop.v1.Params + (*AirdropInfo)(nil), // 3: nova.airdrop.v1.AirdropInfo + (*AirdropState)(nil), // 4: nova.airdrop.v1.AirdropState + (*QuestState)(nil), // 5: nova.airdrop.v1.QuestState + nil, // 6: nova.airdrop.v1.AirdropState.QuestStatesEntry (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp } var file_nova_airdrop_v1_genesis_proto_depIdxs = []int32{ - 6, // 0: nova.airdrop.v1.GenesisState.params:type_name -> nova.airdrop.v1.Params - 3, // 1: nova.airdrop.v1.GenesisState.states:type_name -> nova.airdrop.v1.AirdropState - 5, // 2: nova.airdrop.v1.AirdropState.quest_states:type_name -> nova.airdrop.v1.AirdropState.QuestStatesEntry - 1, // 3: nova.airdrop.v1.QuestState.state:type_name -> nova.airdrop.v1.QuestStateType - 7, // 4: nova.airdrop.v1.QuestState.achieved_at:type_name -> google.protobuf.Timestamp - 7, // 5: nova.airdrop.v1.QuestState.claimed_at:type_name -> google.protobuf.Timestamp - 4, // 6: nova.airdrop.v1.AirdropState.QuestStatesEntry.value:type_name -> nova.airdrop.v1.QuestState - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 4, // 0: nova.airdrop.v1.GenesisState.states:type_name -> nova.airdrop.v1.AirdropState + 3, // 1: nova.airdrop.v1.GenesisState.airdrop_info:type_name -> nova.airdrop.v1.AirdropInfo + 7, // 2: nova.airdrop.v1.AirdropInfo.snapshot_timestamp:type_name -> google.protobuf.Timestamp + 7, // 3: nova.airdrop.v1.AirdropInfo.airdrop_start_timestamp:type_name -> google.protobuf.Timestamp + 7, // 4: nova.airdrop.v1.AirdropInfo.airdrop_end_timestamp:type_name -> google.protobuf.Timestamp + 6, // 5: nova.airdrop.v1.AirdropState.quest_states:type_name -> nova.airdrop.v1.AirdropState.QuestStatesEntry + 1, // 6: nova.airdrop.v1.QuestState.state:type_name -> nova.airdrop.v1.QuestStateType + 7, // 7: nova.airdrop.v1.QuestState.achieved_at:type_name -> google.protobuf.Timestamp + 7, // 8: nova.airdrop.v1.QuestState.claimed_at:type_name -> google.protobuf.Timestamp + 5, // 9: nova.airdrop.v1.AirdropState.QuestStatesEntry.value:type_name -> nova.airdrop.v1.QuestState + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_nova_airdrop_v1_genesis_proto_init() } @@ -2344,7 +3374,6 @@ func file_nova_airdrop_v1_genesis_proto_init() { if File_nova_airdrop_v1_genesis_proto != nil { return } - file_nova_airdrop_v1_params_proto_init() if !protoimpl.UnsafeEnabled { file_nova_airdrop_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { @@ -2359,7 +3388,7 @@ func file_nova_airdrop_v1_genesis_proto_init() { } } file_nova_airdrop_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AirdropState); i { + switch v := v.(*AirdropInfo); i { case 0: return &v.state case 1: @@ -2371,6 +3400,18 @@ func file_nova_airdrop_v1_genesis_proto_init() { } } file_nova_airdrop_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AirdropState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nova_airdrop_v1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QuestState); i { case 0: return &v.state @@ -2389,7 +3430,7 @@ func file_nova_airdrop_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_nova_airdrop_v1_genesis_proto_rawDesc, NumEnums: 2, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/nova/airdrop/v1/params.pulsar.go b/api/nova/airdrop/v1/params.pulsar.go index a981700a..9799bce1 100644 --- a/api/nova/airdrop/v1/params.pulsar.go +++ b/api/nova/airdrop/v1/params.pulsar.go @@ -8,31 +8,19 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" ) var ( - md_Params protoreflect.MessageDescriptor - fd_Params_snapshot_timestamp protoreflect.FieldDescriptor - fd_Params_claimable_timestamp protoreflect.FieldDescriptor - fd_Params_airdrop_end_timestamp protoreflect.FieldDescriptor - fd_Params_airdrop_denom protoreflect.FieldDescriptor - fd_Params_quests_count protoreflect.FieldDescriptor - fd_Params_controller_address protoreflect.FieldDescriptor + md_Params protoreflect.MessageDescriptor ) func init() { file_nova_airdrop_v1_params_proto_init() md_Params = File_nova_airdrop_v1_params_proto.Messages().ByName("Params") - fd_Params_snapshot_timestamp = md_Params.Fields().ByName("snapshot_timestamp") - fd_Params_claimable_timestamp = md_Params.Fields().ByName("claimable_timestamp") - fd_Params_airdrop_end_timestamp = md_Params.Fields().ByName("airdrop_end_timestamp") - fd_Params_airdrop_denom = md_Params.Fields().ByName("airdrop_denom") - fd_Params_quests_count = md_Params.Fields().ByName("quests_count") - fd_Params_controller_address = md_Params.Fields().ByName("controller_address") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -100,42 +88,6 @@ func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { // 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) { - if x.SnapshotTimestamp != nil { - value := protoreflect.ValueOfMessage(x.SnapshotTimestamp.ProtoReflect()) - if !f(fd_Params_snapshot_timestamp, value) { - return - } - } - if x.ClaimableTimestamp != nil { - value := protoreflect.ValueOfMessage(x.ClaimableTimestamp.ProtoReflect()) - if !f(fd_Params_claimable_timestamp, value) { - return - } - } - if x.AirdropEndTimestamp != nil { - value := protoreflect.ValueOfMessage(x.AirdropEndTimestamp.ProtoReflect()) - if !f(fd_Params_airdrop_end_timestamp, value) { - return - } - } - if x.AirdropDenom != "" { - value := protoreflect.ValueOfString(x.AirdropDenom) - if !f(fd_Params_airdrop_denom, value) { - return - } - } - if x.QuestsCount != int32(0) { - value := protoreflect.ValueOfInt32(x.QuestsCount) - if !f(fd_Params_quests_count, value) { - return - } - } - if x.ControllerAddress != "" { - value := protoreflect.ValueOfString(x.ControllerAddress) - if !f(fd_Params_controller_address, value) { - return - } - } } // Has reports whether a field is populated. @@ -151,18 +103,6 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "nova.airdrop.v1.Params.snapshot_timestamp": - return x.SnapshotTimestamp != nil - case "nova.airdrop.v1.Params.claimable_timestamp": - return x.ClaimableTimestamp != nil - case "nova.airdrop.v1.Params.airdrop_end_timestamp": - return x.AirdropEndTimestamp != nil - case "nova.airdrop.v1.Params.airdrop_denom": - return x.AirdropDenom != "" - case "nova.airdrop.v1.Params.quests_count": - return x.QuestsCount != int32(0) - case "nova.airdrop.v1.Params.controller_address": - return x.ControllerAddress != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.Params")) @@ -179,18 +119,6 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "nova.airdrop.v1.Params.snapshot_timestamp": - x.SnapshotTimestamp = nil - case "nova.airdrop.v1.Params.claimable_timestamp": - x.ClaimableTimestamp = nil - case "nova.airdrop.v1.Params.airdrop_end_timestamp": - x.AirdropEndTimestamp = nil - case "nova.airdrop.v1.Params.airdrop_denom": - x.AirdropDenom = "" - case "nova.airdrop.v1.Params.quests_count": - x.QuestsCount = int32(0) - case "nova.airdrop.v1.Params.controller_address": - x.ControllerAddress = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.Params")) @@ -207,24 +135,6 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "nova.airdrop.v1.Params.snapshot_timestamp": - value := x.SnapshotTimestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "nova.airdrop.v1.Params.claimable_timestamp": - value := x.ClaimableTimestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "nova.airdrop.v1.Params.airdrop_end_timestamp": - value := x.AirdropEndTimestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "nova.airdrop.v1.Params.airdrop_denom": - value := x.AirdropDenom - return protoreflect.ValueOfString(value) - case "nova.airdrop.v1.Params.quests_count": - value := x.QuestsCount - return protoreflect.ValueOfInt32(value) - case "nova.airdrop.v1.Params.controller_address": - value := x.ControllerAddress - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.Params")) @@ -245,18 +155,6 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "nova.airdrop.v1.Params.snapshot_timestamp": - x.SnapshotTimestamp = value.Message().Interface().(*timestamppb.Timestamp) - case "nova.airdrop.v1.Params.claimable_timestamp": - x.ClaimableTimestamp = value.Message().Interface().(*timestamppb.Timestamp) - case "nova.airdrop.v1.Params.airdrop_end_timestamp": - x.AirdropEndTimestamp = value.Message().Interface().(*timestamppb.Timestamp) - case "nova.airdrop.v1.Params.airdrop_denom": - x.AirdropDenom = value.Interface().(string) - case "nova.airdrop.v1.Params.quests_count": - x.QuestsCount = int32(value.Int()) - case "nova.airdrop.v1.Params.controller_address": - x.ControllerAddress = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.Params")) @@ -277,27 +175,6 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "nova.airdrop.v1.Params.snapshot_timestamp": - if x.SnapshotTimestamp == nil { - x.SnapshotTimestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.SnapshotTimestamp.ProtoReflect()) - case "nova.airdrop.v1.Params.claimable_timestamp": - if x.ClaimableTimestamp == nil { - x.ClaimableTimestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.ClaimableTimestamp.ProtoReflect()) - case "nova.airdrop.v1.Params.airdrop_end_timestamp": - if x.AirdropEndTimestamp == nil { - x.AirdropEndTimestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.AirdropEndTimestamp.ProtoReflect()) - case "nova.airdrop.v1.Params.airdrop_denom": - panic(fmt.Errorf("field airdrop_denom of message nova.airdrop.v1.Params is not mutable")) - case "nova.airdrop.v1.Params.quests_count": - panic(fmt.Errorf("field quests_count of message nova.airdrop.v1.Params is not mutable")) - case "nova.airdrop.v1.Params.controller_address": - panic(fmt.Errorf("field controller_address of message nova.airdrop.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.Params")) @@ -311,21 +188,6 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore // 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() { - case "nova.airdrop.v1.Params.snapshot_timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "nova.airdrop.v1.Params.claimable_timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "nova.airdrop.v1.Params.airdrop_end_timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "nova.airdrop.v1.Params.airdrop_denom": - return protoreflect.ValueOfString("") - case "nova.airdrop.v1.Params.quests_count": - return protoreflect.ValueOfInt32(int32(0)) - case "nova.airdrop.v1.Params.controller_address": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.Params")) @@ -395,29 +257,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.SnapshotTimestamp != nil { - l = options.Size(x.SnapshotTimestamp) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ClaimableTimestamp != nil { - l = options.Size(x.ClaimableTimestamp) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.AirdropEndTimestamp != nil { - l = options.Size(x.AirdropEndTimestamp) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AirdropDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.QuestsCount != 0 { - n += 1 + runtime.Sov(uint64(x.QuestsCount)) - } - l = len(x.ControllerAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -447,67 +286,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.ControllerAddress) > 0 { - i -= len(x.ControllerAddress) - copy(dAtA[i:], x.ControllerAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerAddress))) - i-- - dAtA[i] = 0x32 - } - if x.QuestsCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.QuestsCount)) - i-- - dAtA[i] = 0x28 - } - if len(x.AirdropDenom) > 0 { - i -= len(x.AirdropDenom) - copy(dAtA[i:], x.AirdropDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AirdropDenom))) - i-- - dAtA[i] = 0x22 - } - if x.AirdropEndTimestamp != nil { - encoded, err := options.Marshal(x.AirdropEndTimestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.ClaimableTimestamp != nil { - encoded, err := options.Marshal(x.ClaimableTimestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.SnapshotTimestamp != nil { - encoded, err := options.Marshal(x.SnapshotTimestamp) - 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 { @@ -557,197 +335,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: 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 SnapshotTimestamp", 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.SnapshotTimestamp == nil { - x.SnapshotTimestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SnapshotTimestamp); 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 ClaimableTimestamp", 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.ClaimableTimestamp == nil { - x.ClaimableTimestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClaimableTimestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AirdropEndTimestamp", 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.AirdropEndTimestamp == nil { - x.AirdropEndTimestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AirdropEndTimestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AirdropDenom", 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.AirdropDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QuestsCount", wireType) - } - x.QuestsCount = 0 - 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++ - x.QuestsCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerAddress", 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.ControllerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -800,19 +387,6 @@ type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // The snapshot date based for the distribution of the airdrop. - SnapshotTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=snapshot_timestamp,json=snapshotTimestamp,proto3" json:"snapshot_timestamp,omitempty"` - // THe time when you can claim your airdrop nova tokens. - ClaimableTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=claimable_timestamp,json=claimableTimestamp,proto3" json:"claimable_timestamp,omitempty"` - // THe time when the user no longer can claim the airdrop tokens. - AirdropEndTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=airdrop_end_timestamp,json=airdropEndTimestamp,proto3" json:"airdrop_end_timestamp,omitempty"` - // The denom for the airdrop coin. - AirdropDenom string `protobuf:"bytes,4,opt,name=airdrop_denom,json=airdropDenom,proto3" json:"airdrop_denom,omitempty"` - // the number of quests user to do - QuestsCount int32 `protobuf:"varint,5,opt,name=quests_count,json=questsCount,proto3" json:"quests_count,omitempty"` - // controller address is responsible to check the user has performed the social quest (e.g. twitter, facebook or etc) - ControllerAddress string `protobuf:"bytes,6,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"` } func (x *Params) Reset() { @@ -835,48 +409,6 @@ func (*Params) Descriptor() ([]byte, []int) { return file_nova_airdrop_v1_params_proto_rawDescGZIP(), []int{0} } -func (x *Params) GetSnapshotTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.SnapshotTimestamp - } - return nil -} - -func (x *Params) GetClaimableTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.ClaimableTimestamp - } - return nil -} - -func (x *Params) GetAirdropEndTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.AirdropEndTimestamp - } - return nil -} - -func (x *Params) GetAirdropDenom() string { - if x != nil { - return x.AirdropDenom - } - return "" -} - -func (x *Params) GetQuestsCount() int32 { - if x != nil { - return x.QuestsCount - } - return 0 -} - -func (x *Params) GetControllerAddress() string { - if x != nil { - return x.ControllerAddress - } - return "" -} - var File_nova_airdrop_v1_params_proto protoreflect.FileDescriptor var file_nova_airdrop_v1_params_proto_rawDesc = []byte{ @@ -886,44 +418,20 @@ var file_nova_airdrop_v1_params_proto_rawDesc = []byte{ 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x53, 0x0a, 0x12, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, - 0xdf, 0x1f, 0x01, 0x52, 0x11, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x55, 0x0a, 0x13, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x69, 0x6d, - 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x58, 0x0a, - 0x15, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, - 0x1f, 0x01, 0x52, 0x13, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x45, 0x6e, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x69, 0x72, 0x64, 0x72, - 0x6f, 0x70, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x0c, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x04, - 0x98, 0xa0, 0x1f, 0x00, 0x42, 0xbb, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x76, - 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x61, 0x72, 0x69, 0x6e, 0x61, 0x2d, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x76, - 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x69, 0x72, - 0x64, 0x72, 0x6f, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x4e, - 0x6f, 0x76, 0x61, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0f, 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1b, 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x11, 0x4e, 0x6f, 0x76, 0x61, 0x3a, 0x3a, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0xbb, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, + 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x61, 0x72, 0x69, 0x6e, 0x61, + 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, + 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x61, + 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, 0x02, + 0x0f, 0x4e, 0x6f, 0x76, 0x61, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0f, 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, + 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x11, 0x4e, 0x6f, 0x76, 0x61, 0x3a, 0x3a, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -940,18 +448,14 @@ func file_nova_airdrop_v1_params_proto_rawDescGZIP() []byte { var file_nova_airdrop_v1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_nova_airdrop_v1_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: nova.airdrop.v1.Params - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp + (*Params)(nil), // 0: nova.airdrop.v1.Params } var file_nova_airdrop_v1_params_proto_depIdxs = []int32{ - 1, // 0: nova.airdrop.v1.Params.snapshot_timestamp:type_name -> google.protobuf.Timestamp - 1, // 1: nova.airdrop.v1.Params.claimable_timestamp:type_name -> google.protobuf.Timestamp - 1, // 2: nova.airdrop.v1.Params.airdrop_end_timestamp:type_name -> google.protobuf.Timestamp - 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 + 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_nova_airdrop_v1_params_proto_init() } diff --git a/api/nova/airdrop/v1/query.pulsar.go b/api/nova/airdrop/v1/query.pulsar.go index cc960e92..fe56f014 100644 --- a/api/nova/airdrop/v1/query.pulsar.go +++ b/api/nova/airdrop/v1/query.pulsar.go @@ -17,23 +17,23 @@ import ( ) var ( - md_QueryParamsRequest protoreflect.MessageDescriptor + md_QueryAirdropInfoRequest protoreflect.MessageDescriptor ) func init() { file_nova_airdrop_v1_query_proto_init() - md_QueryParamsRequest = File_nova_airdrop_v1_query_proto.Messages().ByName("QueryParamsRequest") + md_QueryAirdropInfoRequest = File_nova_airdrop_v1_query_proto.Messages().ByName("QueryAirdropInfoRequest") } -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAirdropInfoRequest)(nil) -type fastReflection_QueryParamsRequest QueryParamsRequest +type fastReflection_QueryAirdropInfoRequest QueryAirdropInfoRequest -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) +func (x *QueryAirdropInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAirdropInfoRequest)(x) } -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryAirdropInfoRequest) slowProtoReflect() protoreflect.Message { mi := &file_nova_airdrop_v1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -45,43 +45,43 @@ func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} +var _fastReflection_QueryAirdropInfoRequest_messageType fastReflection_QueryAirdropInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAirdropInfoRequest_messageType{} -type fastReflection_QueryParamsRequest_messageType struct{} +type fastReflection_QueryAirdropInfoRequest_messageType struct{} -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) +func (x fastReflection_QueryAirdropInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAirdropInfoRequest)(nil) } -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x fastReflection_QueryAirdropInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAirdropInfoRequest) } -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x fastReflection_QueryAirdropInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAirdropInfoRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x *fastReflection_QueryAirdropInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAirdropInfoRequest } // 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 +func (x *fastReflection_QueryAirdropInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAirdropInfoRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x *fastReflection_QueryAirdropInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryAirdropInfoRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) +func (x *fastReflection_QueryAirdropInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAirdropInfoRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -89,7 +89,7 @@ func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessag // 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) { +func (x *fastReflection_QueryAirdropInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -103,13 +103,13 @@ func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescr // 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 { +func (x *fastReflection_QueryAirdropInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoRequest")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoRequest does not contain field %s", fd.FullName())) } } @@ -119,13 +119,13 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAirdropInfoRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoRequest")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoRequest does not contain field %s", fd.FullName())) } } @@ -135,13 +135,13 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto // 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 { +func (x *fastReflection_QueryAirdropInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoRequest")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoRequest does not contain field %s", descriptor.FullName())) } } @@ -155,13 +155,13 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes // 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) { +func (x *fastReflection_QueryAirdropInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoRequest")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoRequest does not contain field %s", fd.FullName())) } } @@ -175,36 +175,36 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, // 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 { +func (x *fastReflection_QueryAirdropInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoRequest")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoRequest 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 { +func (x *fastReflection_QueryAirdropInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoRequest")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoRequest 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 { +func (x *fastReflection_QueryAirdropInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in nova.airdrop.v1.QueryParamsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in nova.airdrop.v1.QueryAirdropInfoRequest", d.FullName())) } panic("unreachable") } @@ -212,7 +212,7 @@ func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescr // 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 { +func (x *fastReflection_QueryAirdropInfoRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -223,7 +223,7 @@ func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.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) { +func (x *fastReflection_QueryAirdropInfoRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -235,7 +235,7 @@ func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFi // 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 { +func (x *fastReflection_QueryAirdropInfoRequest) IsValid() bool { return x != nil } @@ -245,9 +245,9 @@ func (x *fastReflection_QueryParamsRequest) IsValid() bool { // 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 { +func (x *fastReflection_QueryAirdropInfoRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryAirdropInfoRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -269,7 +269,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryAirdropInfoRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -299,7 +299,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryAirdropInfoRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -331,10 +331,10 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { 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") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAirdropInfoRequest: 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAirdropInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -373,25 +373,25 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor + md_QueryAirdropInfoResponse protoreflect.MessageDescriptor + fd_QueryAirdropInfoResponse_airdrop_info protoreflect.FieldDescriptor ) func init() { file_nova_airdrop_v1_query_proto_init() - md_QueryParamsResponse = File_nova_airdrop_v1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") + md_QueryAirdropInfoResponse = File_nova_airdrop_v1_query_proto.Messages().ByName("QueryAirdropInfoResponse") + fd_QueryAirdropInfoResponse_airdrop_info = md_QueryAirdropInfoResponse.Fields().ByName("airdrop_info") } -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAirdropInfoResponse)(nil) -type fastReflection_QueryParamsResponse QueryParamsResponse +type fastReflection_QueryAirdropInfoResponse QueryAirdropInfoResponse -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) +func (x *QueryAirdropInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAirdropInfoResponse)(x) } -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryAirdropInfoResponse) slowProtoReflect() protoreflect.Message { mi := &file_nova_airdrop_v1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -403,43 +403,43 @@ func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} +var _fastReflection_QueryAirdropInfoResponse_messageType fastReflection_QueryAirdropInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAirdropInfoResponse_messageType{} -type fastReflection_QueryParamsResponse_messageType struct{} +type fastReflection_QueryAirdropInfoResponse_messageType struct{} -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) +func (x fastReflection_QueryAirdropInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAirdropInfoResponse)(nil) } -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) +func (x fastReflection_QueryAirdropInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAirdropInfoResponse) } -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse +func (x fastReflection_QueryAirdropInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAirdropInfoResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse +func (x *fastReflection_QueryAirdropInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAirdropInfoResponse } // 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 +func (x *fastReflection_QueryAirdropInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAirdropInfoResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) +func (x *fastReflection_QueryAirdropInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryAirdropInfoResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) +func (x *fastReflection_QueryAirdropInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAirdropInfoResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -447,10 +447,10 @@ func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessa // 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) { +func (x *fastReflection_QueryAirdropInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.AirdropInfo != nil { + value := protoreflect.ValueOfMessage(x.AirdropInfo.ProtoReflect()) + if !f(fd_QueryAirdropInfoResponse_airdrop_info, value) { return } } @@ -467,15 +467,15 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc // 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 { +func (x *fastReflection_QueryAirdropInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "nova.airdrop.v1.QueryParamsResponse.params": - return x.Params != nil + case "nova.airdrop.v1.QueryAirdropInfoResponse.airdrop_info": + return x.AirdropInfo != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoResponse")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoResponse does not contain field %s", fd.FullName())) } } @@ -485,15 +485,15 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAirdropInfoResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "nova.airdrop.v1.QueryParamsResponse.params": - x.Params = nil + case "nova.airdrop.v1.QueryAirdropInfoResponse.airdrop_info": + x.AirdropInfo = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoResponse")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoResponse does not contain field %s", fd.FullName())) } } @@ -503,16 +503,16 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript // 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 { +func (x *fastReflection_QueryAirdropInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "nova.airdrop.v1.QueryParamsResponse.params": - value := x.Params + case "nova.airdrop.v1.QueryAirdropInfoResponse.airdrop_info": + value := x.AirdropInfo return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoResponse")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoResponse does not contain field %s", descriptor.FullName())) } } @@ -526,15 +526,15 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe // 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) { +func (x *fastReflection_QueryAirdropInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "nova.airdrop.v1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) + case "nova.airdrop.v1.QueryAirdropInfoResponse.airdrop_info": + x.AirdropInfo = value.Message().Interface().(*AirdropInfo) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoResponse")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoResponse does not contain field %s", fd.FullName())) } } @@ -548,44 +548,44 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor // 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 { +func (x *fastReflection_QueryAirdropInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "nova.airdrop.v1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) + case "nova.airdrop.v1.QueryAirdropInfoResponse.airdrop_info": + if x.AirdropInfo == nil { + x.AirdropInfo = new(AirdropInfo) } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + return protoreflect.ValueOfMessage(x.AirdropInfo.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoResponse")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoResponse 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 { +func (x *fastReflection_QueryAirdropInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "nova.airdrop.v1.QueryParamsResponse.params": - m := new(Params) + case "nova.airdrop.v1.QueryAirdropInfoResponse.airdrop_info": + m := new(AirdropInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: nova.airdrop.v1.QueryAirdropInfoResponse")) } - panic(fmt.Errorf("message nova.airdrop.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message nova.airdrop.v1.QueryAirdropInfoResponse 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 { +func (x *fastReflection_QueryAirdropInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in nova.airdrop.v1.QueryParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in nova.airdrop.v1.QueryAirdropInfoResponse", d.FullName())) } panic("unreachable") } @@ -593,7 +593,7 @@ func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDesc // 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 { +func (x *fastReflection_QueryAirdropInfoResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -604,7 +604,7 @@ func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.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) { +func (x *fastReflection_QueryAirdropInfoResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -616,7 +616,7 @@ func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawF // 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 { +func (x *fastReflection_QueryAirdropInfoResponse) IsValid() bool { return x != nil } @@ -626,9 +626,9 @@ func (x *fastReflection_QueryParamsResponse) IsValid() bool { // 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 { +func (x *fastReflection_QueryAirdropInfoResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryAirdropInfoResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -640,8 +640,8 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.Params != nil { - l = options.Size(x.Params) + if x.AirdropInfo != nil { + l = options.Size(x.AirdropInfo) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -654,7 +654,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryAirdropInfoResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -673,8 +673,8 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) + if x.AirdropInfo != nil { + encoded, err := options.Marshal(x.AirdropInfo) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -698,7 +698,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryAirdropInfoResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -730,15 +730,15 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods 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") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAirdropInfoResponse: 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAirdropInfoResponse: 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AirdropInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -765,10 +765,10 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Params == nil { - x.Params = &Params{} + if x.AirdropInfo == nil { + x.AirdropInfo = &AirdropInfo{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AirdropInfo); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -2763,14 +2763,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type QueryParamsRequest struct { +type QueryAirdropInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} +func (x *QueryAirdropInfoRequest) Reset() { + *x = QueryAirdropInfoRequest{} if protoimpl.UnsafeEnabled { mi := &file_nova_airdrop_v1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2778,28 +2778,27 @@ func (x *QueryParamsRequest) Reset() { } } -func (x *QueryParamsRequest) String() string { +func (x *QueryAirdropInfoRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryAirdropInfoRequest) ProtoMessage() {} -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAirdropInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryAirdropInfoRequest) Descriptor() ([]byte, []int) { return file_nova_airdrop_v1_query_proto_rawDescGZIP(), []int{0} } -type QueryParamsResponse struct { +type QueryAirdropInfoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + AirdropInfo *AirdropInfo `protobuf:"bytes,1,opt,name=airdrop_info,json=airdropInfo,proto3" json:"airdrop_info,omitempty"` } -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} +func (x *QueryAirdropInfoResponse) Reset() { + *x = QueryAirdropInfoResponse{} if protoimpl.UnsafeEnabled { mi := &file_nova_airdrop_v1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2807,20 +2806,20 @@ func (x *QueryParamsResponse) Reset() { } } -func (x *QueryParamsResponse) String() string { +func (x *QueryAirdropInfoResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryAirdropInfoResponse) ProtoMessage() {} -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAirdropInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryAirdropInfoResponse) Descriptor() ([]byte, []int) { return file_nova_airdrop_v1_query_proto_rawDescGZIP(), []int{1} } -func (x *QueryParamsResponse) GetParams() *Params { +func (x *QueryAirdropInfoResponse) GetAirdropInfo() *AirdropInfo { if x != nil { - return x.Params + return x.AirdropInfo } return nil } @@ -2979,87 +2978,85 @@ var file_nova_airdrop_v1_query_proto_rawDesc = []byte{ 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 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, 0x4c, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, - 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x22, 0x3c, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x74, 0x6f, 0x1a, 0x1d, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, + 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x18, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x69, 0x72, 0x64, + 0x72, 0x6f, 0x70, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x69, + 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x3c, 0x0a, 0x20, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x41, + 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x69, + 0x72, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, + 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x32, 0x0a, + 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x93, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x32, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x17, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, - 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x6f, 0x76, - 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x32, 0xb7, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x74, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, - 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6e, 0x6f, - 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x6e, 0x6f, 0x76, 0x61, - 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x14, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x46, 0x6f, 0x72, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x12, 0x31, 0x2e, 0x6e, 0x6f, - 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, - 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, - 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x46, 0x6f, 0x72, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x6e, 0x6f, 0x76, - 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x61, 0x69, 0x72, - 0x64, 0x72, 0x6f, 0x70, 0x12, 0x85, 0x01, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, + 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, + 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, - 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, - 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, - 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0xba, 0x01, 0x0a, - 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, - 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, - 0x61, 0x72, 0x69, 0x6e, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, - 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x4e, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x4e, 0x6f, 0x76, 0x61, 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, - 0x6f, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, - 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, - 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4e, 0x6f, 0x76, 0x61, 0x3a, 0x3a, 0x41, 0x69, - 0x72, 0x64, 0x72, 0x6f, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, + 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x10, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xa7, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x64, 0x0a, 0x0b, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x28, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6e, 0x6f, + 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xaf, 0x01, 0x0a, 0x14, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, + 0x70, 0x12, 0x31, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, + 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, + 0x12, 0x28, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x66, + 0x6f, 0x72, 0x5f, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x12, 0x85, 0x01, 0x0a, 0x0a, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x6e, 0x6f, 0x76, 0x61, + 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, + 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x51, 0x75, 0x65, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x69, 0x72, 0x64, + 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x42, 0xba, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x76, 0x61, 0x2e, + 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x61, 0x72, 0x69, 0x6e, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, + 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x6f, 0x76, 0x61, 0x2f, 0x61, + 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x69, 0x72, 0x64, 0x72, 0x6f, + 0x70, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x41, 0x58, 0xaa, 0x02, 0x0f, 0x4e, 0x6f, 0x76, 0x61, + 0x2e, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x4e, 0x6f, + 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, + 0x4e, 0x6f, 0x76, 0x61, 0x5c, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4e, 0x6f, + 0x76, 0x61, 0x3a, 0x3a, 0x41, 0x69, 0x72, 0x64, 0x72, 0x6f, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3076,26 +3073,26 @@ func file_nova_airdrop_v1_query_proto_rawDescGZIP() []byte { var file_nova_airdrop_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_nova_airdrop_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: nova.airdrop.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: nova.airdrop.v1.QueryParamsResponse + (*QueryAirdropInfoRequest)(nil), // 0: nova.airdrop.v1.QueryAirdropInfoRequest + (*QueryAirdropInfoResponse)(nil), // 1: nova.airdrop.v1.QueryAirdropInfoResponse (*QueryTotalAssetForAirdropRequest)(nil), // 2: nova.airdrop.v1.QueryTotalAssetForAirdropRequest (*QueryTotalAssetForAirdropResponse)(nil), // 3: nova.airdrop.v1.QueryTotalAssetForAirdropResponse (*QueryQuestStateRequest)(nil), // 4: nova.airdrop.v1.QueryQuestStateRequest (*QueryQuestStateResponse)(nil), // 5: nova.airdrop.v1.QueryQuestStateResponse nil, // 6: nova.airdrop.v1.QueryQuestStateResponse.QuestStatesEntry - (*Params)(nil), // 7: nova.airdrop.v1.Params + (*AirdropInfo)(nil), // 7: nova.airdrop.v1.AirdropInfo (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin (*QuestState)(nil), // 9: nova.airdrop.v1.QuestState } var file_nova_airdrop_v1_query_proto_depIdxs = []int32{ - 7, // 0: nova.airdrop.v1.QueryParamsResponse.params:type_name -> nova.airdrop.v1.Params + 7, // 0: nova.airdrop.v1.QueryAirdropInfoResponse.airdrop_info:type_name -> nova.airdrop.v1.AirdropInfo 8, // 1: nova.airdrop.v1.QueryTotalAssetForAirdropResponse.total_assets:type_name -> cosmos.base.v1beta1.Coin 6, // 2: nova.airdrop.v1.QueryQuestStateResponse.quest_states:type_name -> nova.airdrop.v1.QueryQuestStateResponse.QuestStatesEntry 9, // 3: nova.airdrop.v1.QueryQuestStateResponse.QuestStatesEntry.value:type_name -> nova.airdrop.v1.QuestState - 0, // 4: nova.airdrop.v1.Query.Params:input_type -> nova.airdrop.v1.QueryParamsRequest + 0, // 4: nova.airdrop.v1.Query.AirdropInfo:input_type -> nova.airdrop.v1.QueryAirdropInfoRequest 2, // 5: nova.airdrop.v1.Query.TotalAssetForAirdrop:input_type -> nova.airdrop.v1.QueryTotalAssetForAirdropRequest 4, // 6: nova.airdrop.v1.Query.QuestState:input_type -> nova.airdrop.v1.QueryQuestStateRequest - 1, // 7: nova.airdrop.v1.Query.Params:output_type -> nova.airdrop.v1.QueryParamsResponse + 1, // 7: nova.airdrop.v1.Query.AirdropInfo:output_type -> nova.airdrop.v1.QueryAirdropInfoResponse 3, // 8: nova.airdrop.v1.Query.TotalAssetForAirdrop:output_type -> nova.airdrop.v1.QueryTotalAssetForAirdropResponse 5, // 9: nova.airdrop.v1.Query.QuestState:output_type -> nova.airdrop.v1.QueryQuestStateResponse 7, // [7:10] is the sub-list for method output_type @@ -3110,11 +3107,10 @@ func file_nova_airdrop_v1_query_proto_init() { if File_nova_airdrop_v1_query_proto != nil { return } - file_nova_airdrop_v1_params_proto_init() file_nova_airdrop_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_nova_airdrop_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { + switch v := v.(*QueryAirdropInfoRequest); i { case 0: return &v.state case 1: @@ -3126,7 +3122,7 @@ func file_nova_airdrop_v1_query_proto_init() { } } file_nova_airdrop_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { + switch v := v.(*QueryAirdropInfoResponse); i { case 0: return &v.state case 1: diff --git a/api/nova/airdrop/v1/query_grpc.pb.go b/api/nova/airdrop/v1/query_grpc.pb.go index 54c59500..5fce13dd 100644 --- a/api/nova/airdrop/v1/query_grpc.pb.go +++ b/api/nova/airdrop/v1/query_grpc.pb.go @@ -22,8 +22,8 @@ const _ = grpc.SupportPackageIsVersion7 // // 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 { - // Params returns the total set of minting parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // get airdrop info + AirdropInfo(ctx context.Context, in *QueryAirdropInfoRequest, opts ...grpc.CallOption) (*QueryAirdropInfoResponse, error) // get total assets of the airdrop for a given address TotalAssetForAirdrop(ctx context.Context, in *QueryTotalAssetForAirdropRequest, opts ...grpc.CallOption) (*QueryTotalAssetForAirdropResponse, error) // query for state of quests @@ -38,9 +38,9 @@ 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, "/nova.airdrop.v1.Query/Params", in, out, opts...) +func (c *queryClient) AirdropInfo(ctx context.Context, in *QueryAirdropInfoRequest, opts ...grpc.CallOption) (*QueryAirdropInfoResponse, error) { + out := new(QueryAirdropInfoResponse) + err := c.cc.Invoke(ctx, "/nova.airdrop.v1.Query/AirdropInfo", in, out, opts...) if err != nil { return nil, err } @@ -69,8 +69,8 @@ func (c *queryClient) QuestState(ctx context.Context, in *QueryQuestStateRequest // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { - // Params returns the total set of minting parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // get airdrop info + AirdropInfo(context.Context, *QueryAirdropInfoRequest) (*QueryAirdropInfoResponse, error) // get total assets of the airdrop for a given address TotalAssetForAirdrop(context.Context, *QueryTotalAssetForAirdropRequest) (*QueryTotalAssetForAirdropResponse, error) // query for state of quests @@ -82,8 +82,8 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +func (UnimplementedQueryServer) AirdropInfo(context.Context, *QueryAirdropInfoRequest) (*QueryAirdropInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AirdropInfo not implemented") } func (UnimplementedQueryServer) TotalAssetForAirdrop(context.Context, *QueryTotalAssetForAirdropRequest) (*QueryTotalAssetForAirdropResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalAssetForAirdrop not implemented") @@ -104,20 +104,20 @@ 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) +func _Query_AirdropInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAirdropInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) + return srv.(QueryServer).AirdropInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nova.airdrop.v1.Query/Params", + FullMethod: "/nova.airdrop.v1.Query/AirdropInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + return srv.(QueryServer).AirdropInfo(ctx, req.(*QueryAirdropInfoRequest)) } return interceptor(ctx, in, info, handler) } @@ -166,8 +166,8 @@ var Query_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Params", - Handler: _Query_Params_Handler, + MethodName: "AirdropInfo", + Handler: _Query_AirdropInfo_Handler, }, { MethodName: "TotalAssetForAirdrop", diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 89cd60ff..bc0245a0 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -226,7 +226,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers( airdropKeeper := airdropkeeper.NewKeeper( appCodec, appKeepers.keys[airdroptypes.StoreKey], - appKeepers.GetSubspace(airdroptypes.ModuleName), appKeepers.AccountKeeper, appKeepers.BankKeeper, ) diff --git a/proto/nova/airdrop/v1/genesis.proto b/proto/nova/airdrop/v1/genesis.proto index 3d46dee4..595f6254 100644 --- a/proto/nova/airdrop/v1/genesis.proto +++ b/proto/nova/airdrop/v1/genesis.proto @@ -1,8 +1,6 @@ syntax = "proto3"; package nova.airdrop.v1; -import "nova/airdrop/v1/params.proto"; - import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; @@ -10,11 +8,43 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/Carina-labs/nova/x/airdrop/types"; message GenesisState { - // params defines all the parameters of module. - Params params = 1; - // states for the airdrop, how much coins are allocated for each address is must be pre-defined. repeated AirdropState states = 2; + + // information for the airdrop + AirdropInfo airdrop_info = 3; +} + +message AirdropInfo { + // The snapshot date based for the distribution of the airdrop. + google.protobuf.Timestamp snapshot_timestamp = 1 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + + // THe time when you can claim your airdrop nova tokens. + google.protobuf.Timestamp airdrop_start_timestamp = 2 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + + // THe time when the user no longer can claim the airdrop tokens. + google.protobuf.Timestamp airdrop_end_timestamp = 3 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + + // The denom for the airdrop coin. + string airdrop_denom = 4; + + // the number of quests user to do + int32 quests_count = 5; + + // controller address is responsible to check the user has performed the social quest (e.g. twitter, facebook or etc) + string controller_address = 6; + + // maximum token allocation for each user, an use cannot claim more than this amount; + string maximum_token_alloc_per_user = 7; } enum QuestType { @@ -62,4 +92,7 @@ message QuestState { (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + + // claimed amount, this field is empty if user not claimed for this quest yet + string claimed_amount = 4; } \ No newline at end of file diff --git a/proto/nova/airdrop/v1/params.proto b/proto/nova/airdrop/v1/params.proto deleted file mode 100644 index 74216e29..00000000 --- a/proto/nova/airdrop/v1/params.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax="proto3"; -package nova.airdrop.v1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/Carina-labs/nova/x/airdrop/types"; - -message Params { - option (gogoproto.goproto_stringer) = false; - - // The snapshot date based for the distribution of the airdrop. - google.protobuf.Timestamp snapshot_timestamp = 1 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false - ]; - - // THe time when you can claim your airdrop nova tokens. - google.protobuf.Timestamp claimable_timestamp = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false - ]; - - // THe time when the user no longer can claim the airdrop tokens. - google.protobuf.Timestamp airdrop_end_timestamp = 3 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false - ]; - - // The denom for the airdrop coin. - string airdrop_denom = 4; - - // the number of quests user to do - int32 quests_count = 5; - - // controller address is responsible to check the user has performed the social quest (e.g. twitter, facebook or etc) - string controller_address = 6; -} \ No newline at end of file diff --git a/proto/nova/airdrop/v1/query.proto b/proto/nova/airdrop/v1/query.proto index 4cf69552..894af463 100644 --- a/proto/nova/airdrop/v1/query.proto +++ b/proto/nova/airdrop/v1/query.proto @@ -5,16 +5,13 @@ import "cosmos/base/v1beta1/coin.proto"; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; -import "nova/airdrop/v1/params.proto"; import "nova/airdrop/v1/genesis.proto"; option go_package = "github.com/Carina-labs/nova/x/airdrop/types"; service Query { - // Params returns the total set of minting parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/nova/airdrop/v1/params"; - } + // get airdrop info + rpc AirdropInfo(QueryAirdropInfoRequest) returns (QueryAirdropInfoResponse) {} // get total assets of the airdrop for a given address rpc TotalAssetForAirdrop(QueryTotalAssetForAirdropRequest) returns (QueryTotalAssetForAirdropResponse) { @@ -27,10 +24,9 @@ service Query { } } -message QueryParamsRequest {} -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; +message QueryAirdropInfoRequest {} +message QueryAirdropInfoResponse { + AirdropInfo airdrop_info = 1; } message QueryTotalAssetForAirdropRequest { diff --git a/x/airdrop/keeper/genesis.go b/x/airdrop/keeper/genesis.go index 5501d518..177895e9 100644 --- a/x/airdrop/keeper/genesis.go +++ b/x/airdrop/keeper/genesis.go @@ -6,7 +6,7 @@ import ( ) func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState) { - k.SetParams(ctx, genState.Params) + } func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { diff --git a/x/airdrop/keeper/grpc_query.go b/x/airdrop/keeper/grpc_query.go index d155aaea..4e26ecd3 100644 --- a/x/airdrop/keeper/grpc_query.go +++ b/x/airdrop/keeper/grpc_query.go @@ -15,7 +15,7 @@ func NewQuerier(k Keeper) Querier { return Querier{Keeper: k} } -func (q Querier) Params(ctx context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { +func (q Querier) AirdropInfo(ctx context.Context, request *types.QueryAirdropInfoRequest) (*types.QueryAirdropInfoResponse, error) { //TODO implement me panic("implement me") } diff --git a/x/airdrop/keeper/keeper.go b/x/airdrop/keeper/keeper.go index 833a7dac..08a9c447 100644 --- a/x/airdrop/keeper/keeper.go +++ b/x/airdrop/keeper/keeper.go @@ -4,14 +4,12 @@ import ( "github.com/Carina-labs/nova/x/airdrop/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" ) type Keeper struct { cdc codec.BinaryCodec storeKey sdk.StoreKey - paramSpace paramtypes.Subspace accountKeeper types.AccountKeeper bankKeeper types.BankKeeper } @@ -19,18 +17,12 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, key sdk.StoreKey, - paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ) Keeper { - if !paramSpace.HasKeyTable() { - paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) - } - return Keeper{ cdc: cdc, storeKey: key, - paramSpace: paramSpace, accountKeeper: accountKeeper, bankKeeper: bankKeeper, } diff --git a/x/airdrop/keeper/params.go b/x/airdrop/keeper/params.go deleted file mode 100644 index 2a13c645..00000000 --- a/x/airdrop/keeper/params.go +++ /dev/null @@ -1,17 +0,0 @@ -package keeper - -import ( - "github.com/Carina-labs/nova/x/airdrop/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// SetParams sets the auth module's parameters. -func (k Keeper) SetParams(ctx sdk.Context, params *types.Params) { - k.paramSpace.SetParamSet(ctx, params) -} - -// GetParams gets the auth module's parameters. -func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - k.paramSpace.GetParamSet(ctx, ¶ms) - return -} diff --git a/x/airdrop/types/errors.go b/x/airdrop/types/errors.go index ab1254f4..94aff159 100644 --- a/x/airdrop/types/errors.go +++ b/x/airdrop/types/errors.go @@ -1 +1,8 @@ package types + +import "github.com/cosmos/cosmos-sdk/types/errors" + +var ( + ErrTokenAllocCannotExceedMaxCap = errors.Register(ModuleName, 1, "token allocation cannot exceed max cap") + ErrTimeConditionNotMet = errors.Register(ModuleName, 2, "time condition not met") +) diff --git a/x/airdrop/types/genesis.go b/x/airdrop/types/genesis.go index 4bbfb151..db57ef99 100644 --- a/x/airdrop/types/genesis.go +++ b/x/airdrop/types/genesis.go @@ -1,13 +1,95 @@ package types -func NewGenesisState() *GenesisState { - return &GenesisState{} +import ( + "fmt" + "time" + + "github.com/Carina-labs/nova/app/params" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +func NewGenesisState(state []*AirdropState, airdropInfo *AirdropInfo) *GenesisState { + return &GenesisState{ + States: state, + AirdropInfo: airdropInfo, + } } func DefaultGenesis() *GenesisState { - return &GenesisState{} + return &GenesisState{ + States: nil, + AirdropInfo: &AirdropInfo{ + SnapshotTimestamp: time.Now(), + AirdropStartTimestamp: time.Now().Add(time.Hour * 24 * 7), + AirdropEndTimestamp: time.Now().Add(time.Hour * 24 * 31), + AirdropDenom: params.BaseCoinUnit, + QuestsCount: 5, + ControllerAddress: sdk.AccAddress([]byte{0x1}).String(), + MaximumTokenAllocPerUser: sdk.NewInt(10000_00000).String(), + }, + } } func (gs GenesisState) Validate() error { + if gs.AirdropInfo == nil { + return sdkerrors.Wrap(sdkerrors.ErrNotFound, "airdrop info is required") + } + + maxTokenAlloc, ok := sdk.NewIntFromString(gs.AirdropInfo.MaximumTokenAllocPerUser) + if !ok { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("maximum token alloc %s is invalid", gs.AirdropInfo.MaximumTokenAllocPerUser)) + } + + if maxTokenAlloc.IsNegative() { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("maximum token alloc should be posivie: %v", gs.AirdropInfo.MaximumTokenAllocPerUser)) + } + + for _, state := range gs.States { + tokenAlloc, ok := sdk.NewIntFromString(state.TotalAmount) + if !ok { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("token amount %s is invalid", state.TotalAmount)) + } + + if tokenAlloc.IsNegative() { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("token amount should be posivie: %v", state.TotalAmount)) + } + + if tokenAlloc.GT(maxTokenAlloc) { + return sdkerrors.Wrap(ErrTokenAllocCannotExceedMaxCap, fmt.Sprintf("airdrop token allocation on each user must be less than or equal to maxTokenAllocPerUser")) + } + + // check recipient address is valid + _, err := sdk.AccAddressFromBech32(state.Recipient) + if err != nil { + return err + } + } + + if !gs.AirdropInfo.SnapshotTimestamp.Before(gs.AirdropInfo.AirdropStartTimestamp) { + return sdkerrors.Wrap(ErrTimeConditionNotMet, fmt.Sprintf("snpashot date must be before airdrop start date")) + } + + if !gs.AirdropInfo.AirdropStartTimestamp.Before(gs.AirdropInfo.AirdropEndTimestamp) { + return sdkerrors.Wrap(ErrTimeConditionNotMet, fmt.Sprintf("airdrop start date must be before airdrop end date")) + } + + if _, err := sdk.AccAddressFromBech32(gs.AirdropInfo.ControllerAddress); err != nil { + return err + } + return nil } + +// EmptyQuestState returns an empty quest state +// the state must start from NotStarted +// archivedAt & claimedAt must be zero +// claimedAmount must be zero +func EmptyQuestState() *QuestState { + return &QuestState{ + State: QuestStateType_QUEST_STATE_NOT_STARTED, + AchievedAt: time.Time{}, + ClaimedAt: time.Time{}, + ClaimedAmount: sdk.ZeroInt().String(), + } +} diff --git a/x/airdrop/types/genesis.pb.go b/x/airdrop/types/genesis.pb.go index 09d4dd33..2b668a8b 100644 --- a/x/airdrop/types/genesis.pb.go +++ b/x/airdrop/types/genesis.pb.go @@ -94,10 +94,10 @@ func (QuestStateType) EnumDescriptor() ([]byte, []int) { } type GenesisState struct { - // params defines all the parameters of module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // states for the airdrop, how much coins are allocated for each address is must be pre-defined. States []*AirdropState `protobuf:"bytes,2,rep,name=states,proto3" json:"states,omitempty"` + // information for the airdrop + AirdropInfo *AirdropInfo `protobuf:"bytes,3,opt,name=airdrop_info,json=airdropInfo,proto3" json:"airdrop_info,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -133,20 +133,119 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetParams() *Params { +func (m *GenesisState) GetStates() []*AirdropState { if m != nil { - return m.Params + return m.States } return nil } -func (m *GenesisState) GetStates() []*AirdropState { +func (m *GenesisState) GetAirdropInfo() *AirdropInfo { if m != nil { - return m.States + return m.AirdropInfo } return nil } +type AirdropInfo struct { + // The snapshot date based for the distribution of the airdrop. + SnapshotTimestamp time.Time `protobuf:"bytes,1,opt,name=snapshot_timestamp,json=snapshotTimestamp,proto3,stdtime" json:"snapshot_timestamp"` + // THe time when you can claim your airdrop nova tokens. + AirdropStartTimestamp time.Time `protobuf:"bytes,2,opt,name=airdrop_start_timestamp,json=airdropStartTimestamp,proto3,stdtime" json:"airdrop_start_timestamp"` + // THe time when the user no longer can claim the airdrop tokens. + AirdropEndTimestamp time.Time `protobuf:"bytes,3,opt,name=airdrop_end_timestamp,json=airdropEndTimestamp,proto3,stdtime" json:"airdrop_end_timestamp"` + // The denom for the airdrop coin. + AirdropDenom string `protobuf:"bytes,4,opt,name=airdrop_denom,json=airdropDenom,proto3" json:"airdrop_denom,omitempty"` + // the number of quests user to do + QuestsCount int32 `protobuf:"varint,5,opt,name=quests_count,json=questsCount,proto3" json:"quests_count,omitempty"` + // controller address is responsible to check the user has performed the social quest (e.g. twitter, facebook or etc) + ControllerAddress string `protobuf:"bytes,6,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"` + // maximum token allocation for each user, an use cannot claim more than this amount; + MaximumTokenAllocPerUser string `protobuf:"bytes,7,opt,name=maximum_token_alloc_per_user,json=maximumTokenAllocPerUser,proto3" json:"maximum_token_alloc_per_user,omitempty"` +} + +func (m *AirdropInfo) Reset() { *m = AirdropInfo{} } +func (m *AirdropInfo) String() string { return proto.CompactTextString(m) } +func (*AirdropInfo) ProtoMessage() {} +func (*AirdropInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_aac0a958a67617af, []int{1} +} +func (m *AirdropInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AirdropInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AirdropInfo.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 *AirdropInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AirdropInfo.Merge(m, src) +} +func (m *AirdropInfo) XXX_Size() int { + return m.Size() +} +func (m *AirdropInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AirdropInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AirdropInfo proto.InternalMessageInfo + +func (m *AirdropInfo) GetSnapshotTimestamp() time.Time { + if m != nil { + return m.SnapshotTimestamp + } + return time.Time{} +} + +func (m *AirdropInfo) GetAirdropStartTimestamp() time.Time { + if m != nil { + return m.AirdropStartTimestamp + } + return time.Time{} +} + +func (m *AirdropInfo) GetAirdropEndTimestamp() time.Time { + if m != nil { + return m.AirdropEndTimestamp + } + return time.Time{} +} + +func (m *AirdropInfo) GetAirdropDenom() string { + if m != nil { + return m.AirdropDenom + } + return "" +} + +func (m *AirdropInfo) GetQuestsCount() int32 { + if m != nil { + return m.QuestsCount + } + return 0 +} + +func (m *AirdropInfo) GetControllerAddress() string { + if m != nil { + return m.ControllerAddress + } + return "" +} + +func (m *AirdropInfo) GetMaximumTokenAllocPerUser() string { + if m != nil { + return m.MaximumTokenAllocPerUser + } + return "" +} + type AirdropState struct { // address of the airdrop recipient. Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` @@ -160,7 +259,7 @@ func (m *AirdropState) Reset() { *m = AirdropState{} } func (m *AirdropState) String() string { return proto.CompactTextString(m) } func (*AirdropState) ProtoMessage() {} func (*AirdropState) Descriptor() ([]byte, []int) { - return fileDescriptor_aac0a958a67617af, []int{1} + return fileDescriptor_aac0a958a67617af, []int{2} } func (m *AirdropState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,13 +316,15 @@ type QuestState struct { AchievedAt time.Time `protobuf:"bytes,2,opt,name=achieved_at,json=achievedAt,proto3,stdtime" json:"achieved_at"` // claim_timestamp is the timestamp when the user claimed the amount. ClaimedAt time.Time `protobuf:"bytes,3,opt,name=claimed_at,json=claimedAt,proto3,stdtime" json:"claimed_at"` + // claimed amount, this field is empty if user not claimed for this quest yet + ClaimedAmount string `protobuf:"bytes,4,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"` } func (m *QuestState) Reset() { *m = QuestState{} } func (m *QuestState) String() string { return proto.CompactTextString(m) } func (*QuestState) ProtoMessage() {} func (*QuestState) Descriptor() ([]byte, []int) { - return fileDescriptor_aac0a958a67617af, []int{2} + return fileDescriptor_aac0a958a67617af, []int{3} } func (m *QuestState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,10 +374,18 @@ func (m *QuestState) GetClaimedAt() time.Time { return time.Time{} } +func (m *QuestState) GetClaimedAmount() string { + if m != nil { + return m.ClaimedAmount + } + return "" +} + func init() { proto.RegisterEnum("nova.airdrop.v1.QuestType", QuestType_name, QuestType_value) proto.RegisterEnum("nova.airdrop.v1.QuestStateType", QuestStateType_name, QuestStateType_value) proto.RegisterType((*GenesisState)(nil), "nova.airdrop.v1.GenesisState") + proto.RegisterType((*AirdropInfo)(nil), "nova.airdrop.v1.AirdropInfo") proto.RegisterType((*AirdropState)(nil), "nova.airdrop.v1.AirdropState") proto.RegisterMapType((map[int32]*QuestState)(nil), "nova.airdrop.v1.AirdropState.QuestStatesEntry") proto.RegisterType((*QuestState)(nil), "nova.airdrop.v1.QuestState") @@ -285,46 +394,57 @@ func init() { func init() { proto.RegisterFile("nova/airdrop/v1/genesis.proto", fileDescriptor_aac0a958a67617af) } var fileDescriptor_aac0a958a67617af = []byte{ - // 610 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xc1, 0x4e, 0xdb, 0x4c, - 0x14, 0x85, 0xe3, 0xe4, 0x07, 0xfd, 0xb9, 0x89, 0xa8, 0x35, 0xa5, 0x22, 0x0d, 0xe0, 0x50, 0x56, - 0x88, 0xaa, 0xb6, 0x92, 0x0a, 0xa9, 0xea, 0xce, 0x24, 0x16, 0xb5, 0x94, 0xc6, 0xc4, 0x36, 0x48, - 0x6d, 0x17, 0xd6, 0x24, 0x4c, 0x8d, 0xd5, 0xd8, 0x63, 0x3c, 0x13, 0xab, 0x79, 0x85, 0xae, 0x78, - 0x2c, 0x76, 0x65, 0xd9, 0x55, 0x5b, 0xc1, 0x83, 0xb4, 0xf2, 0xd8, 0xd4, 0x14, 0x24, 0xa4, 0xee, - 0xae, 0xef, 0x39, 0xf7, 0xdc, 0xcf, 0x33, 0x1a, 0xd8, 0x8c, 0x68, 0x8a, 0x35, 0x1c, 0x24, 0x27, - 0x09, 0x8d, 0xb5, 0xb4, 0xab, 0xf9, 0x24, 0x22, 0x2c, 0x60, 0x6a, 0x9c, 0x50, 0x4e, 0xd1, 0xa3, - 0x4c, 0x56, 0x0b, 0x59, 0x4d, 0xbb, 0xed, 0x8d, 0xbb, 0xfe, 0x18, 0x27, 0x38, 0x2c, 0xec, 0x6d, - 0x65, 0x4a, 0x59, 0x48, 0x99, 0x36, 0xc1, 0x8c, 0x68, 0x69, 0x77, 0x42, 0x38, 0xee, 0x6a, 0x53, - 0x1a, 0x44, 0x85, 0xbe, 0xea, 0x53, 0x9f, 0x8a, 0x52, 0xcb, 0xaa, 0xa2, 0xdb, 0xf1, 0x29, 0xf5, - 0x67, 0x44, 0x13, 0x5f, 0x93, 0xf9, 0x47, 0x8d, 0x07, 0x21, 0x61, 0x1c, 0x87, 0x71, 0x6e, 0xd8, - 0x4e, 0xa1, 0x79, 0x90, 0x63, 0x39, 0x1c, 0x73, 0x82, 0x34, 0x58, 0xce, 0xd7, 0xb6, 0xa4, 0x2d, - 0x69, 0xa7, 0xd1, 0x5b, 0x53, 0xef, 0x60, 0xaa, 0x87, 0x42, 0xb6, 0x0b, 0x1b, 0xda, 0x83, 0x65, - 0x96, 0x4d, 0xb2, 0x56, 0x75, 0xab, 0xb6, 0xd3, 0xe8, 0x6d, 0xde, 0x1b, 0xd0, 0xf3, 0x52, 0xe4, - 0xdb, 0x85, 0x79, 0xfb, 0x97, 0x04, 0xcd, 0xdb, 0x02, 0xda, 0x80, 0x7a, 0x42, 0xa6, 0x41, 0x1c, - 0x90, 0x88, 0x8b, 0xdd, 0x75, 0xbb, 0x6c, 0xa0, 0x67, 0xd0, 0xe4, 0x94, 0xe3, 0x99, 0x87, 0x43, - 0x3a, 0x8f, 0x78, 0xab, 0x2a, 0x0c, 0x0d, 0xd1, 0xd3, 0x45, 0x0b, 0x8d, 0xa1, 0x79, 0x36, 0x27, - 0x8c, 0x7b, 0x05, 0x4e, 0x4d, 0xe0, 0xa8, 0x0f, 0xe2, 0xa8, 0xe3, 0x6c, 0x42, 0x94, 0xcc, 0x88, - 0x78, 0xb2, 0xb0, 0x1b, 0x67, 0x65, 0xa7, 0xfd, 0x01, 0xe4, 0xbb, 0x06, 0x24, 0x43, 0xed, 0x13, - 0x59, 0x08, 0xc2, 0x25, 0x3b, 0x2b, 0x51, 0x17, 0x96, 0x52, 0x3c, 0x9b, 0x13, 0x01, 0xd5, 0xe8, - 0xad, 0xdf, 0xdb, 0x58, 0x66, 0xd8, 0xb9, 0xf3, 0x75, 0xf5, 0x95, 0xb4, 0xfd, 0x55, 0x02, 0x28, - 0x15, 0xb4, 0x07, 0x4b, 0x02, 0x5c, 0x24, 0xaf, 0xf4, 0x3a, 0x0f, 0xa4, 0xb8, 0x8b, 0x98, 0xd8, - 0xb9, 0x1b, 0x19, 0xd0, 0xc0, 0xd3, 0xd3, 0x80, 0xa4, 0xe4, 0xc4, 0xc3, 0xbc, 0x40, 0x68, 0xab, - 0xf9, 0xb5, 0xab, 0x37, 0xd7, 0xae, 0xba, 0x37, 0xd7, 0xbe, 0xff, 0xff, 0xc5, 0xf7, 0x4e, 0xe5, - 0xfc, 0x47, 0x47, 0xb2, 0xe1, 0x66, 0x50, 0xe7, 0xa8, 0x0f, 0x30, 0x9d, 0xe1, 0x20, 0xcc, 0x53, - 0x6a, 0xff, 0x90, 0x52, 0x2f, 0xe6, 0x74, 0xbe, 0xfb, 0x45, 0x82, 0xba, 0xa0, 0xcc, 0x00, 0xd1, - 0x1a, 0x3c, 0x1e, 0x1f, 0x19, 0x8e, 0xeb, 0x8d, 0x2c, 0xf7, 0x8d, 0x39, 0x3a, 0xf0, 0x5c, 0xcb, - 0x1b, 0x58, 0x72, 0x05, 0xc9, 0xd0, 0xcc, 0x05, 0xc7, 0xea, 0x9b, 0xfa, 0x50, 0x96, 0x50, 0x0b, - 0x56, 0x8b, 0xce, 0xc8, 0xd3, 0x1d, 0xc7, 0x70, 0xbd, 0xfe, 0x50, 0x37, 0xdf, 0xca, 0x55, 0xb4, - 0x0e, 0x6b, 0xb9, 0x72, 0x68, 0x5b, 0xc7, 0xe6, 0xc0, 0xf0, 0x86, 0xe6, 0xf8, 0xc8, 0x1c, 0x98, - 0xee, 0x3b, 0xb9, 0x56, 0x8a, 0xc7, 0x96, 0x6b, 0x78, 0xd6, 0x28, 0x33, 0x1d, 0x5a, 0x8e, 0x3e, - 0x74, 0xe4, 0xff, 0x76, 0x31, 0xac, 0xfc, 0x7d, 0x62, 0xa5, 0xdd, 0x71, 0x75, 0xd7, 0xc8, 0xb0, - 0xb2, 0xca, 0x76, 0x8d, 0x81, 0x5c, 0x41, 0x4f, 0xe1, 0xc9, 0x6d, 0x51, 0xec, 0xd7, 0xf7, 0x87, - 0x86, 0x2c, 0x95, 0x3f, 0x72, 0x4b, 0x32, 0x06, 0x72, 0x75, 0xdf, 0xb8, 0xb8, 0x52, 0xa4, 0xcb, - 0x2b, 0x45, 0xfa, 0x79, 0xa5, 0x48, 0xe7, 0xd7, 0x4a, 0xe5, 0xf2, 0x5a, 0xa9, 0x7c, 0xbb, 0x56, - 0x2a, 0xef, 0x9f, 0xfb, 0x01, 0x3f, 0x9d, 0x4f, 0xd4, 0x29, 0x0d, 0xb5, 0x3e, 0x4e, 0x82, 0x08, - 0xbf, 0x98, 0xe1, 0x09, 0xd3, 0xc4, 0x0b, 0xff, 0xfc, 0xe7, 0x8d, 0xf3, 0x45, 0x4c, 0xd8, 0x64, - 0x59, 0x9c, 0xef, 0xcb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x6c, 0x46, 0x0f, 0x30, 0x04, - 0x00, 0x00, + // 800 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xdb, 0x46, + 0x10, 0x15, 0xa5, 0xc8, 0xad, 0x46, 0x8a, 0xcb, 0x6c, 0x12, 0x98, 0x75, 0x1c, 0xd9, 0x75, 0x51, + 0xc0, 0x48, 0x11, 0x12, 0x72, 0x11, 0xa0, 0xe8, 0xa1, 0x05, 0x2d, 0x11, 0x29, 0x01, 0xd5, 0xb4, + 0x49, 0x3a, 0xe8, 0x17, 0xb0, 0x58, 0x51, 0x6b, 0x99, 0x08, 0xc9, 0x65, 0xb9, 0x2b, 0x21, 0xfa, + 0x03, 0x3d, 0xf4, 0x94, 0x9f, 0x95, 0x63, 0x7a, 0xeb, 0xa9, 0x2d, 0xec, 0xff, 0xd0, 0x6b, 0x0b, + 0x2e, 0x49, 0x51, 0x4d, 0x51, 0x03, 0xba, 0x0d, 0xdf, 0x7b, 0xf3, 0x76, 0x66, 0xf7, 0x41, 0x82, + 0xc7, 0x09, 0x5b, 0x10, 0x83, 0x84, 0xd9, 0x34, 0x63, 0xa9, 0xb1, 0x18, 0x18, 0x33, 0x9a, 0x50, + 0x1e, 0x72, 0x3d, 0xcd, 0x98, 0x60, 0xe8, 0x83, 0x9c, 0xd6, 0x4b, 0x5a, 0x5f, 0x0c, 0x76, 0xfb, + 0x01, 0xe3, 0x31, 0xe3, 0xc6, 0x84, 0x70, 0x6a, 0x2c, 0x06, 0x13, 0x2a, 0xc8, 0xc0, 0x08, 0x58, + 0x98, 0x14, 0x0d, 0xbb, 0x0f, 0x66, 0x6c, 0xc6, 0x64, 0x69, 0xe4, 0x55, 0x89, 0xee, 0xcf, 0x18, + 0x9b, 0x45, 0xd4, 0x90, 0x5f, 0x93, 0xf9, 0xa5, 0x21, 0xc2, 0x98, 0x72, 0x41, 0xe2, 0xb4, 0x10, + 0x1c, 0xfe, 0xac, 0x40, 0xef, 0x79, 0x71, 0xb2, 0x27, 0x88, 0xa0, 0xe8, 0x19, 0x6c, 0xf1, 0xbc, + 0xe0, 0x5a, 0xf3, 0xa0, 0x75, 0xd4, 0x3d, 0x7e, 0xac, 0xbf, 0x33, 0x89, 0x6e, 0x16, 0xa5, 0x94, + 0xbb, 0xa5, 0x18, 0x7d, 0x05, 0xbd, 0x52, 0x82, 0xc3, 0xe4, 0x92, 0x69, 0xad, 0x03, 0xe5, 0xa8, + 0x7b, 0xbc, 0xf7, 0x7f, 0xcd, 0x76, 0x72, 0xc9, 0xdc, 0x2e, 0xa9, 0x3f, 0x0e, 0x7f, 0x6d, 0x41, + 0x77, 0x8d, 0x44, 0x1e, 0x20, 0x9e, 0x90, 0x94, 0x5f, 0x31, 0x81, 0x57, 0x43, 0x6b, 0x8a, 0xb4, + 0xdd, 0xd5, 0x8b, 0xb5, 0xf4, 0x6a, 0x2d, 0xdd, 0xaf, 0x14, 0x27, 0xef, 0xbf, 0xf9, 0x7d, 0xbf, + 0xf1, 0xfa, 0x8f, 0x7d, 0xc5, 0xbd, 0x57, 0xf5, 0xaf, 0x48, 0xf4, 0x23, 0xec, 0x54, 0x53, 0x72, + 0x41, 0xb2, 0x75, 0xe7, 0xe6, 0x06, 0xce, 0x0f, 0xc9, 0xea, 0x0a, 0xb2, 0x35, 0xf7, 0x6f, 0xa1, + 0x22, 0x30, 0x4d, 0xa6, 0x6b, 0xde, 0xad, 0x0d, 0xbc, 0xef, 0x97, 0x16, 0x56, 0x32, 0xad, 0x9d, + 0x3f, 0x86, 0xbb, 0x95, 0xf3, 0x94, 0x26, 0x2c, 0xd6, 0xee, 0x1c, 0x28, 0x47, 0x1d, 0xb7, 0xba, + 0xf2, 0x51, 0x8e, 0xa1, 0x8f, 0xa0, 0xf7, 0xd3, 0x9c, 0x72, 0xc1, 0x71, 0xc0, 0xe6, 0x89, 0xd0, + 0xda, 0x07, 0xca, 0x51, 0xdb, 0xed, 0x16, 0xd8, 0x30, 0x87, 0xd0, 0x53, 0x40, 0x01, 0x4b, 0x44, + 0xc6, 0xa2, 0x88, 0x66, 0x98, 0x4c, 0xa7, 0x19, 0xe5, 0x5c, 0xdb, 0x92, 0x66, 0xf7, 0x6a, 0xc6, + 0x2c, 0x08, 0xf4, 0x25, 0xec, 0xc5, 0xe4, 0x55, 0x18, 0xcf, 0x63, 0x2c, 0xd8, 0x4b, 0x9a, 0x60, + 0x12, 0x45, 0x2c, 0xc0, 0x29, 0xcd, 0xf0, 0x9c, 0xd3, 0x4c, 0x7b, 0x4f, 0x36, 0x6a, 0xa5, 0xc6, + 0xcf, 0x25, 0x66, 0xae, 0x38, 0xa3, 0xd9, 0x05, 0xa7, 0xd9, 0xe1, 0xdf, 0x0a, 0xf4, 0xd6, 0xd3, + 0x82, 0xf6, 0xa0, 0x93, 0xd1, 0x20, 0x4c, 0x43, 0x9a, 0x08, 0xf9, 0x96, 0x1d, 0xb7, 0x06, 0xf2, + 0x05, 0x04, 0x13, 0x24, 0xc2, 0x24, 0x96, 0x0b, 0x34, 0xa5, 0xa0, 0x2b, 0x31, 0x53, 0x42, 0xe8, + 0xbc, 0xdc, 0x11, 0x97, 0x19, 0x6d, 0xc9, 0x8c, 0xea, 0xb7, 0x66, 0x54, 0x3f, 0xcf, 0x3b, 0x64, + 0xc9, 0xad, 0x44, 0x64, 0xcb, 0xf2, 0x4e, 0x0a, 0x64, 0xf7, 0x07, 0x50, 0xdf, 0x15, 0x20, 0x15, + 0x5a, 0x2f, 0xe9, 0x52, 0x4e, 0xd8, 0x76, 0xf3, 0x12, 0x0d, 0xa0, 0xbd, 0x20, 0xd1, 0x9c, 0x96, + 0x39, 0x79, 0xf4, 0x9f, 0x13, 0x6b, 0x0f, 0xb7, 0x50, 0x7e, 0xd1, 0xfc, 0x5c, 0x39, 0xfc, 0x4b, + 0x01, 0xa8, 0x19, 0xf4, 0x0c, 0xda, 0x72, 0x70, 0xe9, 0xbc, 0x7d, 0xbc, 0x7f, 0x8b, 0x8b, 0xbf, + 0x4c, 0xa9, 0x5b, 0xa8, 0x91, 0x05, 0x5d, 0x12, 0x5c, 0x85, 0x74, 0x41, 0xa7, 0x98, 0x88, 0x8d, + 0xa2, 0x0a, 0x55, 0xa3, 0x29, 0xd0, 0x10, 0x20, 0x88, 0x48, 0x18, 0x17, 0x2e, 0x9b, 0x84, 0xb2, + 0x53, 0xf6, 0x99, 0x02, 0x7d, 0x02, 0xdb, 0x2b, 0x93, 0xe2, 0x99, 0x8a, 0x2c, 0xde, 0xad, 0x24, + 0x12, 0x7c, 0xf2, 0x8b, 0x02, 0x1d, 0xb9, 0x4c, 0xbe, 0x07, 0xda, 0x81, 0xfb, 0xe7, 0x17, 0x96, + 0xe7, 0xe3, 0x53, 0xc7, 0xff, 0xda, 0x3e, 0x7d, 0x8e, 0x7d, 0x07, 0x8f, 0x1c, 0xb5, 0x81, 0x54, + 0xe8, 0x15, 0x84, 0xe7, 0x0c, 0x6d, 0x73, 0xac, 0x2a, 0x48, 0x83, 0x07, 0x25, 0x72, 0x8a, 0x4d, + 0xcf, 0xb3, 0x7c, 0x3c, 0x1c, 0x9b, 0xf6, 0x37, 0x6a, 0x13, 0x3d, 0x82, 0x9d, 0x82, 0x39, 0x73, + 0x9d, 0x17, 0xf6, 0xc8, 0xc2, 0x63, 0xfb, 0xfc, 0xc2, 0x1e, 0xd9, 0xfe, 0x77, 0x6a, 0xab, 0x26, + 0x5f, 0x38, 0xbe, 0x85, 0x9d, 0xd3, 0x5c, 0x74, 0xe6, 0x78, 0xe6, 0xd8, 0x53, 0xef, 0x3c, 0x21, + 0xb0, 0xfd, 0xef, 0x8b, 0xad, 0xe5, 0x9e, 0x6f, 0xfa, 0x56, 0x3e, 0x56, 0x5e, 0xb9, 0xbe, 0x35, + 0x52, 0x1b, 0xe8, 0x43, 0x78, 0xb8, 0x4e, 0xca, 0xf3, 0xcd, 0x93, 0xb1, 0xa5, 0x2a, 0xf5, 0x22, + 0x6b, 0x94, 0x35, 0x52, 0x9b, 0x27, 0xd6, 0x9b, 0xeb, 0xbe, 0xf2, 0xf6, 0xba, 0xaf, 0xfc, 0x79, + 0xdd, 0x57, 0x5e, 0xdf, 0xf4, 0x1b, 0x6f, 0x6f, 0xfa, 0x8d, 0xdf, 0x6e, 0xfa, 0x8d, 0xef, 0x3f, + 0x9d, 0x85, 0xe2, 0x6a, 0x3e, 0xd1, 0x03, 0x16, 0x1b, 0x43, 0x92, 0x85, 0x09, 0x79, 0x1a, 0x91, + 0x09, 0x37, 0xe4, 0xef, 0xff, 0xab, 0xd5, 0x3f, 0x80, 0x58, 0xa6, 0x94, 0x4f, 0xb6, 0xe4, 0x33, + 0x7c, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x5d, 0x88, 0x3c, 0x1e, 0x06, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -347,6 +467,18 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AirdropInfo != nil { + { + size, err := m.AirdropInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if len(m.States) > 0 { for iNdEx := len(m.States) - 1; iNdEx >= 0; iNdEx-- { { @@ -361,18 +493,79 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } + return len(dAtA) - i, nil +} + +func (m *AirdropInfo) 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 *AirdropInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AirdropInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MaximumTokenAllocPerUser) > 0 { + i -= len(m.MaximumTokenAllocPerUser) + copy(dAtA[i:], m.MaximumTokenAllocPerUser) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.MaximumTokenAllocPerUser))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x3a + } + if len(m.ControllerAddress) > 0 { + i -= len(m.ControllerAddress) + copy(dAtA[i:], m.ControllerAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ControllerAddress))) + i-- + dAtA[i] = 0x32 + } + if m.QuestsCount != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.QuestsCount)) + i-- + dAtA[i] = 0x28 + } + if len(m.AirdropDenom) > 0 { + i -= len(m.AirdropDenom) + copy(dAtA[i:], m.AirdropDenom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AirdropDenom))) + i-- + dAtA[i] = 0x22 + } + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AirdropEndTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AirdropEndTimestamp):]) + if err2 != nil { + return 0, err2 } + i -= n2 + i = encodeVarintGenesis(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x1a + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AirdropStartTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AirdropStartTimestamp):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintGenesis(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x12 + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SnapshotTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SnapshotTimestamp):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintGenesis(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -457,20 +650,27 @@ func (m *QuestState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ClaimedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimedAt):]) - if err3 != nil { - return 0, err3 + if len(m.ClaimedAmount) > 0 { + i -= len(m.ClaimedAmount) + copy(dAtA[i:], m.ClaimedAmount) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ClaimedAmount))) + i-- + dAtA[i] = 0x22 } - i -= n3 - i = encodeVarintGenesis(dAtA, i, uint64(n3)) + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ClaimedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimedAt):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintGenesis(dAtA, i, uint64(n6)) i-- dAtA[i] = 0x1a - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AchievedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AchievedAt):]) - if err4 != nil { - return 0, err4 + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AchievedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AchievedAt):]) + if err7 != nil { + return 0, err7 } - i -= n4 - i = encodeVarintGenesis(dAtA, i, uint64(n4)) + i -= n7 + i = encodeVarintGenesis(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x12 if m.State != 0 { @@ -498,16 +698,46 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - } if len(m.States) > 0 { for _, e := range m.States { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } + if m.AirdropInfo != nil { + l = m.AirdropInfo.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *AirdropInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SnapshotTimestamp) + n += 1 + l + sovGenesis(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.AirdropStartTimestamp) + n += 1 + l + sovGenesis(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.AirdropEndTimestamp) + n += 1 + l + sovGenesis(uint64(l)) + l = len(m.AirdropDenom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.QuestsCount != 0 { + n += 1 + sovGenesis(uint64(m.QuestsCount)) + } + l = len(m.ControllerAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.MaximumTokenAllocPerUser) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -554,6 +784,10 @@ func (m *QuestState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimedAt) n += 1 + l + sovGenesis(uint64(l)) + l = len(m.ClaimedAmount) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -592,9 +826,43 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field States", 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 + } + m.States = append(m.States, &AirdropState{}) + if err := m.States[len(m.States)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AirdropInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -621,16 +889,99 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Params == nil { - m.Params = &Params{} + if m.AirdropInfo == nil { + m.AirdropInfo = &AirdropInfo{} } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.AirdropInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 (m *AirdropInfo) 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: AirdropInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AirdropInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapshotTimestamp", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SnapshotTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field States", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AirdropStartTimestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -657,11 +1008,158 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.States = append(m.States, &AirdropState{}) - if err := m.States[len(m.States)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.AirdropStartTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AirdropEndTimestamp", 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 := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.AirdropEndTimestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AirdropDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AirdropDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field QuestsCount", wireType) + } + m.QuestsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.QuestsCount |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ControllerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ControllerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaximumTokenAllocPerUser", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaximumTokenAllocPerUser = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -1026,6 +1524,38 @@ func (m *QuestState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimedAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClaimedAmount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/airdrop/types/genesis_test.go b/x/airdrop/types/genesis_test.go new file mode 100644 index 00000000..3fabde9e --- /dev/null +++ b/x/airdrop/types/genesis_test.go @@ -0,0 +1,93 @@ +package types_test + +import ( + "testing" + "time" + + "github.com/Carina-labs/nova/app/params" + "github.com/Carina-labs/nova/x/airdrop/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +var ( + maxCap = sdk.NewInt(10000_00000) +) + +func validAirdrop() *types.AirdropInfo { + return &types.AirdropInfo{ + SnapshotTimestamp: time.Now(), + AirdropStartTimestamp: time.Now().Add(time.Hour * 24 * 7), + AirdropEndTimestamp: time.Now().Add(time.Hour * 24 * 31), + AirdropDenom: params.BaseCoinUnit, + QuestsCount: 5, + ControllerAddress: sdk.AccAddress([]byte{0x1}).String(), + MaximumTokenAllocPerUser: maxCap.String(), + } +} + +func TestGenesis_ValidateAirdropInfo(t *testing.T) { + invalidAddr := "foobar" + negativeCoin := sdk.NewInt(-1000) + + // check airdrop cannot be nil + gs := types.NewGenesisState(nil, nil) + require.Error(t, gs.Validate()) + + // check airdrop time condition didn't met + gs = types.NewGenesisState(nil, validAirdrop()) + gs.AirdropInfo.AirdropStartTimestamp = gs.AirdropInfo.AirdropEndTimestamp.Add(time.Second) + require.Error(t, gs.Validate()) + + gs = types.NewGenesisState(nil, validAirdrop()) + gs.AirdropInfo.SnapshotTimestamp = gs.AirdropInfo.AirdropStartTimestamp.Add(time.Second) + require.Error(t, gs.Validate()) + + // check invalid controller address + gs = types.NewGenesisState(nil, validAirdrop()) + gs.AirdropInfo.ControllerAddress = invalidAddr + require.Error(t, gs.Validate()) + + // check invalid max cap + gs = types.NewGenesisState(nil, validAirdrop()) + gs.AirdropInfo.MaximumTokenAllocPerUser = negativeCoin.String() + require.Error(t, gs.Validate()) + + gs = types.NewGenesisState(nil, validAirdrop()) + require.NoError(t, gs.Validate()) +} + +func TestGenesis_ValidateState(t *testing.T) { + invalidAddr := "foobar" + + validState := func() *types.AirdropState { + return &types.AirdropState{ + Recipient: sdk.AccAddress{0x1}.String(), + TotalAmount: maxCap.String(), + QuestStates: map[int32]*types.QuestState{ + int32(types.QuestType_QUEST_NOTHING_TO_DO): types.EmptyQuestState(), + }, + } + } + + gs := types.NewGenesisState([]*types.AirdropState{validState()}, validAirdrop()) + require.NoError(t, gs.Validate()) + + // check recipient is invalid address + state := validState() + state.Recipient = invalidAddr + gs = types.NewGenesisState([]*types.AirdropState{state}, validAirdrop()) + require.Error(t, gs.Validate()) + + // check total amount is negative + state = validState() + state.TotalAmount = sdk.NewInt(-1000).String() + gs = types.NewGenesisState([]*types.AirdropState{state}, validAirdrop()) + require.Error(t, gs.Validate()) + + // check total amount is greater than max cap + state = validState() + state.TotalAmount = maxCap.Add(sdk.NewInt(1)).String() + gs = types.NewGenesisState([]*types.AirdropState{state}, validAirdrop()) + require.Error(t, gs.Validate()) +} diff --git a/x/airdrop/types/msgs.go b/x/airdrop/types/msgs.go index ac8cd331..80e1858f 100644 --- a/x/airdrop/types/msgs.go +++ b/x/airdrop/types/msgs.go @@ -1,37 +1,89 @@ package types -import sdk "github.com/cosmos/cosmos-sdk/types" +import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" +) var _ sdk.Msg = &MsgClaimAirdropRequest{} var _ sdk.Msg = &MsgMarkSocialQuestPerformedRequest{} var _ sdk.Msg = &MsgMarkUserProvidedLiquidityRequest{} func (m *MsgClaimAirdropRequest) ValidateBasic() error { - //TODO implement me - panic("implement me") + _, err := sdk.AccAddressFromBech32(m.UserAddress) + if err != nil { + return err + } + + switch m.QuestType { + case QuestType_QUEST_NOTHING_TO_DO: + return nil + case QuestType_QUEST_SOCIAL: + return nil + case QuestType_QUEST_PROVIDE_LIQUIDITY: + return nil + case QuestType_QUEST_SN_ASSET_CLAIM: + return nil + case QuestType_QUEST_VOTE_ON_PROPOSALS: + return nil + default: + return fmt.Errorf("invalid quest type: %v", m.QuestType) + } } func (m *MsgClaimAirdropRequest) GetSigners() []sdk.AccAddress { - //TODO implement me - panic("implement me") + userAddr, err := sdk.AccAddressFromBech32(m.UserAddress) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{userAddr} } func (m *MsgMarkSocialQuestPerformedRequest) ValidateBasic() error { - //TODO implement me - panic("implement me") + _, err := sdk.AccAddressFromBech32(m.ControllerAddress) + if err != nil { + return err + } + + for _, addr := range m.UserAddresses { + if _, err := sdk.AccAddressFromBech32(addr); err != nil { + return err + } + } + + return nil } func (m *MsgMarkSocialQuestPerformedRequest) GetSigners() []sdk.AccAddress { - //TODO implement me - panic("implement me") + controllerAddr, err := sdk.AccAddressFromBech32(m.ControllerAddress) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{controllerAddr} } func (m *MsgMarkUserProvidedLiquidityRequest) ValidateBasic() error { - //TODO implement me - panic("implement me") + _, err := sdk.AccAddressFromBech32(m.ControllerAddress) + if err != nil { + return err + } + + for _, addr := range m.UserAddresses { + if _, err := sdk.AccAddressFromBech32(addr); err != nil { + return err + } + } + + return nil } func (m *MsgMarkUserProvidedLiquidityRequest) GetSigners() []sdk.AccAddress { - //TODO implement me - panic("implement me") + controllerAddr, err := sdk.AccAddressFromBech32(m.ControllerAddress) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{controllerAddr} } diff --git a/x/airdrop/types/msgs_test.go b/x/airdrop/types/msgs_test.go new file mode 100644 index 00000000..55cb2fc7 --- /dev/null +++ b/x/airdrop/types/msgs_test.go @@ -0,0 +1,103 @@ +package types_test + +import ( + "github.com/Carina-labs/nova/x/airdrop/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + "testing" +) + +func TestMsgClaimAirdropRequest_ValidateBasic(t *testing.T) { + invalidAddr := "foobar" + + msg := &types.MsgClaimAirdropRequest{ + UserAddress: sdk.AccAddress([]byte{0x1}).String(), + QuestType: types.QuestType_QUEST_PROVIDE_LIQUIDITY, + } + err := msg.ValidateBasic() + require.NoError(t, err) + + msg.UserAddress = invalidAddr + err = msg.ValidateBasic() + require.Error(t, err) +} + +func TestMsgClaimAirdropRequest_GetSigners(t *testing.T) { + userAddr := sdk.AccAddress([]byte{0x1}) + msg := &types.MsgClaimAirdropRequest{ + UserAddress: userAddr.String(), + QuestType: types.QuestType_QUEST_PROVIDE_LIQUIDITY, + } + signers := msg.GetSigners() + require.Equal(t, signers, []sdk.AccAddress{userAddr}) +} + +func TestMsgMarkSocialQuestPerformedRequest_ValidateBasic(t *testing.T) { + validUser := sdk.AccAddress([]byte{0x1}) + invalidAddr := "foobar" + + msg := &types.MsgMarkSocialQuestPerformedRequest{ + ControllerAddress: validUser.String(), + UserAddresses: []string{validUser.String()}, + } + err := msg.ValidateBasic() + require.NoError(t, err) + + // check controller address is invalid + msg.ControllerAddress = invalidAddr + err = msg.ValidateBasic() + require.Error(t, err) + + // check user addresses is invalid + msg.ControllerAddress = validUser.String() + msg.UserAddresses = []string{invalidAddr} + err = msg.ValidateBasic() + require.Error(t, err) +} + +func TestMsgMarkSocialQuestPerformedRequest_GetSigners(t *testing.T) { + controllerAddr := sdk.AccAddress([]byte{0x1}) + userAddr := sdk.AccAddress([]byte{0x2}) + + msg := &types.MsgMarkSocialQuestPerformedRequest{ + ControllerAddress: controllerAddr.String(), + UserAddresses: []string{userAddr.String()}, + } + signers := msg.GetSigners() + require.Equal(t, signers, []sdk.AccAddress{controllerAddr}) +} + +func TestMsgMarkUserProvidedLiquidityRequest_ValidateBasic(t *testing.T) { + validUser := sdk.AccAddress([]byte{0x1}) + invalidAddr := "foobar" + + msg := &types.MsgMarkUserProvidedLiquidityRequest{ + ControllerAddress: validUser.String(), + UserAddresses: []string{validUser.String()}, + } + err := msg.ValidateBasic() + require.NoError(t, err) + + // check controller address is invalid + msg.ControllerAddress = invalidAddr + err = msg.ValidateBasic() + require.Error(t, err) + + // check user addresses is invalid + msg.ControllerAddress = validUser.String() + msg.UserAddresses = []string{invalidAddr} + err = msg.ValidateBasic() + require.Error(t, err) +} + +func TestMsgMarkUserProvidedLiquidityRequest_GetSigners(t *testing.T) { + controllerAddr := sdk.AccAddress([]byte{0x1}) + userAddr := sdk.AccAddress([]byte{0x2}) + + msg := &types.MsgMarkUserProvidedLiquidityRequest{ + ControllerAddress: controllerAddr.String(), + UserAddresses: []string{userAddr.String()}, + } + signers := msg.GetSigners() + require.Equal(t, signers, []sdk.AccAddress{controllerAddr}) +} diff --git a/x/airdrop/types/params.go b/x/airdrop/types/params.go deleted file mode 100644 index d00aa1ab..00000000 --- a/x/airdrop/types/params.go +++ /dev/null @@ -1,41 +0,0 @@ -package types - -import ( - "time" - - "github.com/Carina-labs/nova/app/params" - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/ghodss/yaml" -) - -func NewParams() Params { - return Params{} -} - -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - -func DefaultParams() Params { - return Params{ - SnapshotTimestamp: time.Unix(0, 0), - ClaimableTimestamp: time.Unix(0, 0), - AirdropDenom: params.BaseCoinUnit, - QuestsCount: 5, - ControllerAddress: sdk.AccAddress([]byte{0x1}).String(), - } -} - -func (p *Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} - -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{} -} - -func (p *Params) Validate() error { - return nil -} diff --git a/x/airdrop/types/params.pb.go b/x/airdrop/types/params.pb.go deleted file mode 100644 index d244f440..00000000 --- a/x/airdrop/types/params.pb.go +++ /dev/null @@ -1,576 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: nova/airdrop/v1/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Params struct { - // The snapshot date based for the distribution of the airdrop. - SnapshotTimestamp time.Time `protobuf:"bytes,1,opt,name=snapshot_timestamp,json=snapshotTimestamp,proto3,stdtime" json:"snapshot_timestamp"` - // THe time when you can claim your airdrop nova tokens. - ClaimableTimestamp time.Time `protobuf:"bytes,2,opt,name=claimable_timestamp,json=claimableTimestamp,proto3,stdtime" json:"claimable_timestamp"` - // THe time when the user no longer can claim the airdrop tokens. - AirdropEndTimestamp time.Time `protobuf:"bytes,3,opt,name=airdrop_end_timestamp,json=airdropEndTimestamp,proto3,stdtime" json:"airdrop_end_timestamp"` - // The denom for the airdrop coin. - AirdropDenom string `protobuf:"bytes,4,opt,name=airdrop_denom,json=airdropDenom,proto3" json:"airdrop_denom,omitempty"` - // the number of quests user to do - QuestsCount int32 `protobuf:"varint,5,opt,name=quests_count,json=questsCount,proto3" json:"quests_count,omitempty"` - // controller address is responsible to check the user has performed the social quest (e.g. twitter, facebook or etc) - ControllerAddress string `protobuf:"bytes,6,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_3606a1093e1fd3a2, []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 (m *Params) GetSnapshotTimestamp() time.Time { - if m != nil { - return m.SnapshotTimestamp - } - return time.Time{} -} - -func (m *Params) GetClaimableTimestamp() time.Time { - if m != nil { - return m.ClaimableTimestamp - } - return time.Time{} -} - -func (m *Params) GetAirdropEndTimestamp() time.Time { - if m != nil { - return m.AirdropEndTimestamp - } - return time.Time{} -} - -func (m *Params) GetAirdropDenom() string { - if m != nil { - return m.AirdropDenom - } - return "" -} - -func (m *Params) GetQuestsCount() int32 { - if m != nil { - return m.QuestsCount - } - return 0 -} - -func (m *Params) GetControllerAddress() string { - if m != nil { - return m.ControllerAddress - } - return "" -} - -func init() { - proto.RegisterType((*Params)(nil), "nova.airdrop.v1.Params") -} - -func init() { proto.RegisterFile("nova/airdrop/v1/params.proto", fileDescriptor_3606a1093e1fd3a2) } - -var fileDescriptor_3606a1093e1fd3a2 = []byte{ - // 357 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0xd2, 0xbf, 0x6a, 0xe3, 0x30, - 0x00, 0x06, 0x70, 0xeb, 0xf2, 0x87, 0x3b, 0x25, 0xc7, 0x11, 0xe5, 0x0e, 0x4c, 0x38, 0xec, 0xdc, - 0x75, 0x09, 0x94, 0x58, 0xa4, 0xdd, 0xba, 0x35, 0x69, 0xf6, 0x92, 0xb6, 0x50, 0xba, 0x18, 0xd9, - 0x56, 0x1d, 0x83, 0x2d, 0xb9, 0x92, 0x1c, 0xda, 0x67, 0xe8, 0x92, 0xb1, 0x63, 0x1f, 0x27, 0x63, - 0xc6, 0x4e, 0x6d, 0x49, 0x5e, 0xa4, 0xf8, 0x6f, 0xb2, 0x66, 0xb3, 0xbf, 0xef, 0xd3, 0x0f, 0x04, - 0x82, 0x7f, 0x19, 0x5f, 0x10, 0x4c, 0x02, 0xe1, 0x09, 0x1e, 0xe3, 0xc5, 0x08, 0xc7, 0x44, 0x90, - 0x48, 0x5a, 0xb1, 0xe0, 0x8a, 0xa3, 0x5f, 0x69, 0x6b, 0x15, 0xad, 0xb5, 0x18, 0xf5, 0x7e, 0xfb, - 0xdc, 0xe7, 0x59, 0x87, 0xd3, 0xaf, 0x7c, 0xd6, 0x33, 0x7d, 0xce, 0xfd, 0x90, 0xe2, 0xec, 0xcf, - 0x49, 0xee, 0xb1, 0x0a, 0x22, 0x2a, 0x15, 0x89, 0xe2, 0x7c, 0xf0, 0xff, 0xb9, 0x06, 0x9b, 0x97, - 0x19, 0x8c, 0xae, 0x20, 0x92, 0x8c, 0xc4, 0x72, 0xce, 0x95, 0x5d, 0xcd, 0x74, 0xd0, 0x07, 0x83, - 0xd6, 0x49, 0xcf, 0xca, 0x21, 0xab, 0x84, 0xac, 0xeb, 0x72, 0x31, 0xfe, 0xbe, 0x7a, 0x37, 0xb5, - 0xe5, 0x87, 0x09, 0x66, 0x9d, 0xf2, 0x7c, 0x55, 0xa2, 0x1b, 0xd8, 0x75, 0x43, 0x12, 0x44, 0xc4, - 0x09, 0xe9, 0x9e, 0xfa, 0xed, 0x00, 0x15, 0x55, 0xc0, 0x8e, 0xbd, 0x85, 0x7f, 0x8a, 0xbb, 0xdb, - 0x94, 0x79, 0x7b, 0x70, 0xed, 0x00, 0xb8, 0x5b, 0x10, 0x53, 0xe6, 0xed, 0xe4, 0x23, 0xf8, 0xb3, - 0x94, 0x3d, 0xca, 0x78, 0xa4, 0xd7, 0xfb, 0x60, 0xf0, 0x63, 0xd6, 0x2e, 0xc2, 0x8b, 0x34, 0x43, - 0xff, 0x60, 0xfb, 0x21, 0xa1, 0x52, 0x49, 0xdb, 0xe5, 0x09, 0x53, 0x7a, 0xa3, 0x0f, 0x06, 0x8d, - 0x59, 0x2b, 0xcf, 0x26, 0x69, 0x84, 0x86, 0x10, 0xb9, 0x9c, 0x29, 0xc1, 0xc3, 0x90, 0x0a, 0x9b, - 0x78, 0x9e, 0xa0, 0x52, 0xea, 0xcd, 0x0c, 0xeb, 0xec, 0x9a, 0xf3, 0xbc, 0x38, 0xab, 0xbf, 0xbc, - 0x9a, 0xda, 0x78, 0xba, 0xda, 0x18, 0x60, 0xbd, 0x31, 0xc0, 0xe7, 0xc6, 0x00, 0xcb, 0xad, 0xa1, - 0xad, 0xb7, 0x86, 0xf6, 0xb6, 0x35, 0xb4, 0xbb, 0x63, 0x3f, 0x50, 0xf3, 0xc4, 0xb1, 0x5c, 0x1e, - 0xe1, 0x09, 0x11, 0x01, 0x23, 0xc3, 0x90, 0x38, 0x12, 0x67, 0x8f, 0xe4, 0xb1, 0x7a, 0x26, 0xea, - 0x29, 0xa6, 0xd2, 0x69, 0x66, 0xd7, 0x3e, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x1f, 0xae, 0xe3, - 0xae, 0x43, 0x02, 0x00, 0x00, -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ControllerAddress) > 0 { - i -= len(m.ControllerAddress) - copy(dAtA[i:], m.ControllerAddress) - i = encodeVarintParams(dAtA, i, uint64(len(m.ControllerAddress))) - i-- - dAtA[i] = 0x32 - } - if m.QuestsCount != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.QuestsCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.AirdropDenom) > 0 { - i -= len(m.AirdropDenom) - copy(dAtA[i:], m.AirdropDenom) - i = encodeVarintParams(dAtA, i, uint64(len(m.AirdropDenom))) - i-- - dAtA[i] = 0x22 - } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AirdropEndTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AirdropEndTimestamp):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintParams(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x1a - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ClaimableTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimableTimestamp):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintParams(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x12 - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SnapshotTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SnapshotTimestamp):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintParams(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0xa - 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 - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SnapshotTimestamp) - n += 1 + l + sovParams(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimableTimestamp) - n += 1 + l + sovParams(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.AirdropEndTimestamp) - n += 1 + l + sovParams(uint64(l)) - l = len(m.AirdropDenom) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - if m.QuestsCount != 0 { - n += 1 + sovParams(uint64(m.QuestsCount)) - } - l = len(m.ControllerAddress) - if l > 0 { - n += 1 + l + sovParams(uint64(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 { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapshotTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SnapshotTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ClaimableTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AirdropEndTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.AirdropEndTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AirdropDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AirdropDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QuestsCount", wireType) - } - m.QuestsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.QuestsCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControllerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ControllerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - 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/airdrop/types/query.pb.go b/x/airdrop/types/query.pb.go index 939e4d8f..7665673e 100644 --- a/x/airdrop/types/query.pb.go +++ b/x/airdrop/types/query.pb.go @@ -30,21 +30,21 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type QueryParamsRequest struct { +type QueryAirdropInfoRequest struct { } -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { +func (m *QueryAirdropInfoRequest) Reset() { *m = QueryAirdropInfoRequest{} } +func (m *QueryAirdropInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAirdropInfoRequest) ProtoMessage() {} +func (*QueryAirdropInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor_b5a3e67f3b02a569, []int{0} } -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryAirdropInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAirdropInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAirdropInfoRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -54,35 +54,34 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) +func (m *QueryAirdropInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAirdropInfoRequest.Merge(m, src) } -func (m *QueryParamsRequest) XXX_Size() int { +func (m *QueryAirdropInfoRequest) XXX_Size() int { return m.Size() } -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +func (m *QueryAirdropInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAirdropInfoRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryAirdropInfoRequest proto.InternalMessageInfo -type QueryParamsResponse struct { - // params defines the parameters of the module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +type QueryAirdropInfoResponse struct { + AirdropInfo *AirdropInfo `protobuf:"bytes,1,opt,name=airdrop_info,json=airdropInfo,proto3" json:"airdrop_info,omitempty"` } -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { +func (m *QueryAirdropInfoResponse) Reset() { *m = QueryAirdropInfoResponse{} } +func (m *QueryAirdropInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAirdropInfoResponse) ProtoMessage() {} +func (*QueryAirdropInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_b5a3e67f3b02a569, []int{1} } -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryAirdropInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAirdropInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAirdropInfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -92,23 +91,23 @@ func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) +func (m *QueryAirdropInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAirdropInfoResponse.Merge(m, src) } -func (m *QueryParamsResponse) XXX_Size() int { +func (m *QueryAirdropInfoResponse) XXX_Size() int { return m.Size() } -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +func (m *QueryAirdropInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAirdropInfoResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryAirdropInfoResponse proto.InternalMessageInfo -func (m *QueryParamsResponse) GetParams() Params { +func (m *QueryAirdropInfoResponse) GetAirdropInfo() *AirdropInfo { if m != nil { - return m.Params + return m.AirdropInfo } - return Params{} + return nil } type QueryTotalAssetForAirdropRequest struct { @@ -291,8 +290,8 @@ func (m *QueryQuestStateResponse) GetQuestStates() map[int32]*QuestState { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "nova.airdrop.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "nova.airdrop.v1.QueryParamsResponse") + proto.RegisterType((*QueryAirdropInfoRequest)(nil), "nova.airdrop.v1.QueryAirdropInfoRequest") + proto.RegisterType((*QueryAirdropInfoResponse)(nil), "nova.airdrop.v1.QueryAirdropInfoResponse") proto.RegisterType((*QueryTotalAssetForAirdropRequest)(nil), "nova.airdrop.v1.QueryTotalAssetForAirdropRequest") proto.RegisterType((*QueryTotalAssetForAirdropResponse)(nil), "nova.airdrop.v1.QueryTotalAssetForAirdropResponse") proto.RegisterType((*QueryQuestStateRequest)(nil), "nova.airdrop.v1.QueryQuestStateRequest") @@ -303,43 +302,43 @@ func init() { func init() { proto.RegisterFile("nova/airdrop/v1/query.proto", fileDescriptor_b5a3e67f3b02a569) } var fileDescriptor_b5a3e67f3b02a569 = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcf, 0x6f, 0x12, 0x41, - 0x14, 0xc7, 0x59, 0x10, 0x8c, 0x43, 0x13, 0x9b, 0x91, 0x08, 0xa5, 0x75, 0xa9, 0x6b, 0x13, 0x89, - 0xa6, 0x3b, 0x5d, 0x8c, 0x89, 0x1a, 0x2f, 0xa5, 0xa9, 0x27, 0x0f, 0x76, 0xf5, 0xa4, 0x26, 0x64, - 0x80, 0x71, 0xdd, 0x14, 0x66, 0x96, 0x9d, 0x81, 0xc8, 0xd5, 0xc4, 0xbb, 0x49, 0xff, 0x0b, 0x2f, - 0x1e, 0xfd, 0x17, 0x7a, 0x6c, 0xa2, 0x07, 0x4f, 0x6a, 0xc0, 0x3f, 0xc4, 0xcc, 0x8f, 0x2d, 0x2d, - 0xac, 0x54, 0x4f, 0x0c, 0xef, 0xbd, 0xef, 0x9b, 0xcf, 0xbc, 0xfd, 0xce, 0x80, 0x75, 0xca, 0x46, - 0x18, 0xe1, 0x30, 0xee, 0xc6, 0x2c, 0x42, 0x23, 0x0f, 0x0d, 0x86, 0x24, 0x1e, 0xbb, 0x51, 0xcc, - 0x04, 0x83, 0x57, 0x65, 0xd2, 0x35, 0x49, 0x77, 0xe4, 0x55, 0xed, 0x0e, 0xe3, 0x7d, 0xc6, 0x51, - 0x1b, 0x73, 0x82, 0x46, 0x5e, 0x9b, 0x08, 0xec, 0xa1, 0x0e, 0x0b, 0xa9, 0x16, 0x54, 0x37, 0x02, - 0xc6, 0x82, 0x1e, 0x41, 0x38, 0x0a, 0x11, 0xa6, 0x94, 0x09, 0x2c, 0x42, 0x46, 0xb9, 0xc9, 0x96, - 0x02, 0x16, 0x30, 0xb5, 0x44, 0x72, 0x95, 0x68, 0xe6, 0x09, 0x22, 0x1c, 0xe3, 0x7e, 0xa2, 0xb9, - 0x31, 0x9f, 0x0d, 0x08, 0x25, 0x3c, 0x34, 0x69, 0xa7, 0x04, 0xe0, 0x81, 0x04, 0x7e, 0xa6, 0x34, - 0x3e, 0x19, 0x0c, 0x09, 0x17, 0xce, 0x53, 0x70, 0xed, 0x5c, 0x94, 0x47, 0x8c, 0x72, 0x02, 0xef, - 0x83, 0x82, 0xee, 0x5d, 0xb1, 0x36, 0xad, 0x7a, 0xb1, 0x51, 0x76, 0xe7, 0xce, 0xe7, 0x6a, 0x41, - 0xf3, 0xd2, 0xf1, 0x8f, 0x5a, 0xc6, 0x37, 0xc5, 0xce, 0x63, 0xb0, 0xa9, 0xba, 0xbd, 0x60, 0x02, - 0xf7, 0x76, 0x39, 0x27, 0xe2, 0x09, 0x8b, 0x77, 0xb5, 0xc8, 0xec, 0x08, 0x2b, 0xe0, 0x32, 0xee, - 0x76, 0x63, 0xc2, 0x75, 0xef, 0x2b, 0x7e, 0xf2, 0xd7, 0x39, 0xb2, 0xc0, 0xcd, 0x25, 0x72, 0x83, - 0x46, 0xc1, 0x8a, 0x90, 0xf9, 0x16, 0x96, 0x05, 0x09, 0xe0, 0x9a, 0xab, 0xe7, 0xed, 0xca, 0x79, - 0xbb, 0x66, 0xde, 0xee, 0x1e, 0x0b, 0x69, 0x73, 0x47, 0x22, 0x7e, 0xfa, 0x59, 0xab, 0x07, 0xa1, - 0x78, 0x3b, 0x6c, 0xbb, 0x1d, 0xd6, 0x47, 0xe6, 0xe3, 0xe8, 0x9f, 0x6d, 0xde, 0x3d, 0x44, 0x62, - 0x1c, 0x11, 0xae, 0x04, 0xdc, 0x2f, 0x8a, 0x53, 0x00, 0xee, 0x34, 0xc0, 0x75, 0x05, 0x75, 0x20, - 0xe9, 0x9f, 0x0b, 0x2c, 0xc8, 0xc5, 0x27, 0xf9, 0x66, 0x81, 0xf2, 0x82, 0xc8, 0xf0, 0xbf, 0x06, - 0x2b, 0x4a, 0xde, 0xe2, 0x32, 0x2c, 0xa5, 0xb9, 0x7a, 0xb1, 0xf1, 0x70, 0x61, 0xc0, 0x7f, 0xd1, - 0xbb, 0xb3, 0x10, 0xdf, 0xa7, 0x22, 0x1e, 0xfb, 0xc5, 0xc1, 0x2c, 0x52, 0x7d, 0x05, 0x56, 0xe7, - 0x0b, 0xe0, 0x2a, 0xc8, 0x1d, 0x92, 0xb1, 0x62, 0xcc, 0xfb, 0x72, 0x09, 0x3d, 0x90, 0x1f, 0xe1, - 0xde, 0x90, 0x54, 0xb2, 0x6a, 0x78, 0xeb, 0x69, 0x9b, 0x27, 0xfb, 0xea, 0xca, 0x47, 0xd9, 0x07, - 0x56, 0xe3, 0x4b, 0x0e, 0xe4, 0x15, 0x16, 0x14, 0xa0, 0xa0, 0x0d, 0x00, 0x6f, 0xa5, 0x83, 0x9f, - 0x73, 0x59, 0x75, 0x6b, 0x79, 0x91, 0x3e, 0x99, 0x53, 0x7b, 0xff, 0xf5, 0xf7, 0x51, 0x76, 0x0d, - 0x96, 0x51, 0xba, 0xcf, 0xe1, 0x67, 0x0b, 0x94, 0xd2, 0xbc, 0x01, 0xbd, 0xf4, 0xfe, 0x4b, 0x6c, - 0x58, 0x6d, 0xfc, 0x8f, 0xc4, 0x00, 0xee, 0x28, 0xc0, 0x3b, 0xb0, 0xbe, 0x00, 0x78, 0xc6, 0x91, - 0xad, 0x37, 0x2c, 0x6e, 0x99, 0x14, 0xfc, 0x60, 0x01, 0x30, 0x9b, 0x25, 0xbc, 0x7d, 0xf1, 0x57, - 0xd6, 0x74, 0xf5, 0x7f, 0xb5, 0x83, 0xb3, 0xa5, 0x98, 0x6c, 0xb8, 0x81, 0x52, 0x9e, 0xa7, 0xc4, - 0x65, 0xcd, 0xfd, 0xe3, 0x89, 0x6d, 0x9d, 0x4c, 0x6c, 0xeb, 0xd7, 0xc4, 0xb6, 0x3e, 0x4e, 0xed, - 0xcc, 0xc9, 0xd4, 0xce, 0x7c, 0x9f, 0xda, 0x99, 0x97, 0x77, 0xcf, 0xdc, 0x8a, 0x3d, 0x1c, 0x87, - 0x14, 0x6f, 0xf7, 0x70, 0x9b, 0xeb, 0x6e, 0xef, 0x4e, 0xfb, 0xa9, 0xeb, 0xd1, 0x2e, 0xa8, 0xa7, - 0xe4, 0xde, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0x1b, 0x34, 0x6c, 0x0b, 0x05, 0x00, 0x00, + // 568 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xc1, 0x6b, 0x13, 0x4f, + 0x14, 0xc7, 0xb3, 0x09, 0xf9, 0xfd, 0x70, 0x36, 0x60, 0x19, 0x8a, 0xa6, 0x69, 0xdc, 0xd6, 0x45, + 0x70, 0x55, 0x3a, 0xd3, 0x8d, 0x17, 0x15, 0x41, 0xda, 0x52, 0xc1, 0x63, 0xa3, 0x27, 0x2b, 0x84, + 0x49, 0x32, 0x59, 0x97, 0xa6, 0xf3, 0x92, 0x9d, 0x49, 0x30, 0x57, 0xc1, 0xbb, 0xd0, 0x3f, 0x42, + 0xf0, 0xe2, 0xbf, 0xd1, 0x63, 0x41, 0x0f, 0x9e, 0x54, 0x12, 0xff, 0x10, 0x99, 0xd9, 0x49, 0x13, + 0x92, 0xb5, 0xad, 0xa7, 0x9d, 0x7d, 0xef, 0x7d, 0xdf, 0x7c, 0xe6, 0xbd, 0x37, 0x83, 0xd6, 0x05, + 0x0c, 0x19, 0x65, 0x71, 0xd2, 0x4e, 0xa0, 0x47, 0x87, 0x21, 0xed, 0x0f, 0x78, 0x32, 0x22, 0xbd, + 0x04, 0x14, 0xe0, 0xeb, 0xda, 0x49, 0xac, 0x93, 0x0c, 0xc3, 0x8a, 0xd7, 0x02, 0x79, 0x0c, 0x92, + 0x36, 0x99, 0xe4, 0x74, 0x18, 0x36, 0xb9, 0x62, 0x21, 0x6d, 0x41, 0x2c, 0x52, 0x41, 0xa5, 0x1a, + 0x01, 0x44, 0x5d, 0x4e, 0x59, 0x2f, 0xa6, 0x4c, 0x08, 0x50, 0x4c, 0xc5, 0x20, 0xa4, 0xf5, 0xae, + 0x46, 0x10, 0x81, 0x59, 0x52, 0xbd, 0xb2, 0xd6, 0x5b, 0x8b, 0x04, 0x11, 0x17, 0x5c, 0xc6, 0x56, + 0xe4, 0xaf, 0xa1, 0x9b, 0x07, 0x1a, 0x69, 0x27, 0x0d, 0x78, 0x21, 0x3a, 0x50, 0xe7, 0xfd, 0x01, + 0x97, 0xca, 0x3f, 0x44, 0xe5, 0x65, 0x97, 0xec, 0x81, 0x90, 0x1c, 0x3f, 0x43, 0x25, 0x9b, 0xb2, + 0x11, 0x8b, 0x0e, 0x94, 0x9d, 0x4d, 0x27, 0x70, 0x6b, 0x55, 0xb2, 0x70, 0x22, 0x32, 0xaf, 0x75, + 0xd9, 0xec, 0xc7, 0x7f, 0x8a, 0x36, 0x4d, 0xf2, 0x57, 0xa0, 0x58, 0x77, 0x47, 0x4a, 0xae, 0x9e, + 0x43, 0x62, 0xa3, 0x2d, 0x00, 0x2e, 0xa3, 0xff, 0x59, 0xbb, 0x9d, 0x70, 0x29, 0x4d, 0xfe, 0x6b, + 0xf5, 0xe9, 0xaf, 0x7f, 0xe2, 0xa0, 0xdb, 0x17, 0xc8, 0x2d, 0xa4, 0x40, 0x25, 0xa5, 0xfd, 0x0d, + 0xa6, 0x03, 0xa4, 0x85, 0x5c, 0x23, 0x69, 0x95, 0x89, 0xae, 0x32, 0xb1, 0x55, 0x26, 0x7b, 0x10, + 0x8b, 0xdd, 0xed, 0xd3, 0x1f, 0x1b, 0xb9, 0xcf, 0x3f, 0x37, 0x82, 0x28, 0x56, 0x6f, 0x07, 0x4d, + 0xd2, 0x82, 0x63, 0x6a, 0x5b, 0x92, 0x7e, 0xb6, 0x64, 0xfb, 0x88, 0xaa, 0x51, 0x8f, 0x4b, 0x23, + 0x90, 0x75, 0x57, 0x9d, 0x03, 0x48, 0xbf, 0x86, 0x6e, 0x18, 0xa8, 0x03, 0x4d, 0xff, 0x52, 0x31, + 0xc5, 0x2f, 0x3f, 0xc9, 0x37, 0xc7, 0x36, 0x60, 0x5e, 0x64, 0xf9, 0xdf, 0xa0, 0x92, 0x91, 0x37, + 0xa4, 0x36, 0x6b, 0x69, 0x21, 0x70, 0x6b, 0x8f, 0x97, 0x8a, 0xfc, 0x17, 0x3d, 0x99, 0x99, 0xe4, + 0xbe, 0x50, 0xc9, 0xa8, 0xee, 0xf6, 0x67, 0x96, 0xca, 0x21, 0x5a, 0x59, 0x0c, 0xc0, 0x2b, 0xa8, + 0x70, 0xc4, 0x47, 0x86, 0xb1, 0x58, 0xd7, 0x4b, 0x1c, 0xa2, 0xe2, 0x90, 0x75, 0x07, 0xbc, 0x9c, + 0x37, 0xc5, 0x5b, 0xcf, 0xda, 0x7c, 0xba, 0x6f, 0x1a, 0xf9, 0x24, 0xff, 0xc8, 0xa9, 0x7d, 0x2a, + 0xa0, 0xa2, 0xc1, 0xc2, 0x6d, 0xe4, 0xce, 0x0d, 0x01, 0x0e, 0xb2, 0xe9, 0x97, 0xc7, 0xaf, 0x72, + 0xef, 0x0a, 0x91, 0xe9, 0x41, 0xfd, 0x1c, 0xfe, 0xe2, 0xa0, 0xd5, 0xac, 0x59, 0xc0, 0x61, 0x76, + 0x96, 0x0b, 0xc6, 0xae, 0x52, 0xfb, 0x17, 0x89, 0x25, 0xd8, 0x7e, 0xff, 0xf5, 0xf7, 0x49, 0xfe, + 0x3e, 0x0e, 0xe8, 0xe2, 0x75, 0x9b, 0x9b, 0xc0, 0x46, 0x07, 0x92, 0x86, 0x75, 0xe1, 0x0f, 0x0e, + 0x42, 0xb3, 0xda, 0xe1, 0xbb, 0x97, 0x77, 0x35, 0xa5, 0x0b, 0xae, 0xda, 0x7e, 0xff, 0x8e, 0x61, + 0xf2, 0x70, 0x95, 0x66, 0x3c, 0x42, 0xd3, 0xa9, 0xda, 0xdd, 0x3f, 0x1d, 0x7b, 0xce, 0xd9, 0xd8, + 0x73, 0x7e, 0x8d, 0x3d, 0xe7, 0xe3, 0xc4, 0xcb, 0x9d, 0x4d, 0xbc, 0xdc, 0xf7, 0x89, 0x97, 0x7b, + 0xfd, 0x60, 0xee, 0x16, 0xec, 0xb1, 0x24, 0x16, 0x6c, 0xab, 0xcb, 0x9a, 0x32, 0xcd, 0xf6, 0xee, + 0x3c, 0x9f, 0xb9, 0x0e, 0xcd, 0xff, 0xcc, 0x73, 0xf2, 0xf0, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xa4, 0x34, 0xa6, 0x94, 0xf1, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -354,8 +353,8 @@ const _ = grpc.SupportPackageIsVersion4 // // 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 { - // Params returns the total set of minting parameters. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // get airdrop info + AirdropInfo(ctx context.Context, in *QueryAirdropInfoRequest, opts ...grpc.CallOption) (*QueryAirdropInfoResponse, error) // get total assets of the airdrop for a given address TotalAssetForAirdrop(ctx context.Context, in *QueryTotalAssetForAirdropRequest, opts ...grpc.CallOption) (*QueryTotalAssetForAirdropResponse, error) // query for state of quests @@ -370,9 +369,9 @@ 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, "/nova.airdrop.v1.Query/Params", in, out, opts...) +func (c *queryClient) AirdropInfo(ctx context.Context, in *QueryAirdropInfoRequest, opts ...grpc.CallOption) (*QueryAirdropInfoResponse, error) { + out := new(QueryAirdropInfoResponse) + err := c.cc.Invoke(ctx, "/nova.airdrop.v1.Query/AirdropInfo", in, out, opts...) if err != nil { return nil, err } @@ -399,8 +398,8 @@ func (c *queryClient) QuestState(ctx context.Context, in *QueryQuestStateRequest // QueryServer is the server API for Query service. type QueryServer interface { - // Params returns the total set of minting parameters. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // get airdrop info + AirdropInfo(context.Context, *QueryAirdropInfoRequest) (*QueryAirdropInfoResponse, error) // get total assets of the airdrop for a given address TotalAssetForAirdrop(context.Context, *QueryTotalAssetForAirdropRequest) (*QueryTotalAssetForAirdropResponse, error) // query for state of quests @@ -411,8 +410,8 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +func (*UnimplementedQueryServer) AirdropInfo(ctx context.Context, req *QueryAirdropInfoRequest) (*QueryAirdropInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AirdropInfo not implemented") } func (*UnimplementedQueryServer) TotalAssetForAirdrop(ctx context.Context, req *QueryTotalAssetForAirdropRequest) (*QueryTotalAssetForAirdropResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalAssetForAirdrop not implemented") @@ -425,20 +424,20 @@ 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) +func _Query_AirdropInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAirdropInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) + return srv.(QueryServer).AirdropInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nova.airdrop.v1.Query/Params", + FullMethod: "/nova.airdrop.v1.Query/AirdropInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + return srv.(QueryServer).AirdropInfo(ctx, req.(*QueryAirdropInfoRequest)) } return interceptor(ctx, in, info, handler) } @@ -484,8 +483,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Params", - Handler: _Query_Params_Handler, + MethodName: "AirdropInfo", + Handler: _Query_AirdropInfo_Handler, }, { MethodName: "TotalAssetForAirdrop", @@ -500,7 +499,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "nova/airdrop/v1/query.proto", } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAirdropInfoRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -510,12 +509,12 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAirdropInfoRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAirdropInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -523,7 +522,7 @@ func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAirdropInfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -533,26 +532,28 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAirdropInfoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAirdropInfoResponse) 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 + if m.AirdropInfo != nil { + { + size, err := m.AirdropInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -707,7 +708,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryParamsRequest) Size() (n int) { +func (m *QueryAirdropInfoRequest) Size() (n int) { if m == nil { return 0 } @@ -716,14 +717,16 @@ func (m *QueryParamsRequest) Size() (n int) { return n } -func (m *QueryParamsResponse) Size() (n int) { +func (m *QueryAirdropInfoResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.AirdropInfo != nil { + l = m.AirdropInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -792,7 +795,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAirdropInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -815,10 +818,10 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAirdropInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAirdropInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -842,7 +845,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAirdropInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -865,15 +868,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAirdropInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAirdropInfoResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field AirdropInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -900,7 +903,10 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.AirdropInfo == nil { + m.AirdropInfo = &AirdropInfo{} + } + if err := m.AirdropInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/airdrop/types/query.pb.gw.go b/x/airdrop/types/query.pb.gw.go index ddafec2b..422d63ad 100644 --- a/x/airdrop/types/query.pb.gw.go +++ b/x/airdrop/types/query.pb.gw.go @@ -33,24 +33,6 @@ 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 - -} - var ( filter_Query_TotalAssetForAirdrop_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -129,29 +111,6 @@ func local_request_Query_QuestState_0(ctx context.Context, marshaler runtime.Mar // 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()...) - - }) - mux.Handle("GET", pattern_Query_TotalAssetForAirdrop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -239,26 +198,6 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "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()...) - - }) - mux.Handle("GET", pattern_Query_TotalAssetForAirdrop_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -303,16 +242,12 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"nova", "airdrop", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TotalAssetForAirdrop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"nova", "airdrop", "v1", "total_asset_for_airdrop"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QuestState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"nova", "airdrop", "v1", "quest_state"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_TotalAssetForAirdrop_0 = runtime.ForwardResponseMessage forward_Query_QuestState_0 = runtime.ForwardResponseMessage