From 22ebf8a35cef8bdc0af422266dfca56537b9010b Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 16 Dec 2024 17:32:29 -0500 Subject: [PATCH] Add Emission Enabled bolean flag to mint module --- CHANGELOG.md | 1 + x/mint/api/mint/v5/genesis.pulsar.go | 915 +++++++++++++ x/mint/api/mint/v5/types.pulsar.go | 1459 +++++++++++++++++++++ x/mint/migrations/v5/migrate.go | 36 + x/mint/migrations/v5/migrate_test.go | 120 ++ x/mint/migrations/v5/oldtypes/types.pb.go | 833 ++++++++++++ x/mint/module/abci.go | 4 + x/mint/module/module.go | 10 +- x/mint/module/module_test.go | 28 + x/mint/proto/mint/v5/genesis.proto | 49 + x/mint/proto/mint/v5/types.proto | 97 ++ x/mint/types/genesis.pb.go | 68 +- x/mint/types/params.go | 6 + x/mint/types/types.pb.go | 130 +- 14 files changed, 3678 insertions(+), 78 deletions(-) create mode 100644 x/mint/api/mint/v5/genesis.pulsar.go create mode 100644 x/mint/api/mint/v5/types.pulsar.go create mode 100644 x/mint/migrations/v5/migrate.go create mode 100644 x/mint/migrations/v5/migrate_test.go create mode 100644 x/mint/migrations/v5/oldtypes/types.pb.go create mode 100644 x/mint/proto/mint/v5/genesis.proto create mode 100644 x/mint/proto/mint/v5/types.proto diff --git a/CHANGELOG.md b/CHANGELOG.md index 66ea388ab..4db681663 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added * [#694](https://github.com/allora-network/allora-chain/pull/694) Make fuzzer whitelist aware +* [#708](https://github.com/allora-network/allora-chain/pull/708) Add Emission Enabled bolean flag to Mint Module ### Fixed diff --git a/x/mint/api/mint/v5/genesis.pulsar.go b/x/mint/api/mint/v5/genesis.pulsar.go new file mode 100644 index 000000000..9d519b756 --- /dev/null +++ b/x/mint/api/mint/v5/genesis.pulsar.go @@ -0,0 +1,915 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package mintv5 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_previous_reward_emission_per_unit_staked_token protoreflect.FieldDescriptor + fd_GenesisState_previous_block_emission protoreflect.FieldDescriptor + fd_GenesisState_ecosystem_tokens_minted protoreflect.FieldDescriptor + fd_GenesisState_months_unlocked protoreflect.FieldDescriptor +) + +func init() { + file_mint_v5_genesis_proto_init() + md_GenesisState = File_mint_v5_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_previous_reward_emission_per_unit_staked_token = md_GenesisState.Fields().ByName("previous_reward_emission_per_unit_staked_token") + fd_GenesisState_previous_block_emission = md_GenesisState.Fields().ByName("previous_block_emission") + fd_GenesisState_ecosystem_tokens_minted = md_GenesisState.Fields().ByName("ecosystem_tokens_minted") + fd_GenesisState_months_unlocked = md_GenesisState.Fields().ByName("months_unlocked") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_mint_v5_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } + if x.PreviousRewardEmissionPerUnitStakedToken != "" { + value := protoreflect.ValueOfString(x.PreviousRewardEmissionPerUnitStakedToken) + if !f(fd_GenesisState_previous_reward_emission_per_unit_staked_token, value) { + return + } + } + if x.PreviousBlockEmission != "" { + value := protoreflect.ValueOfString(x.PreviousBlockEmission) + if !f(fd_GenesisState_previous_block_emission, value) { + return + } + } + if x.EcosystemTokensMinted != "" { + value := protoreflect.ValueOfString(x.EcosystemTokensMinted) + if !f(fd_GenesisState_ecosystem_tokens_minted, value) { + return + } + } + if x.MonthsUnlocked != "" { + value := protoreflect.ValueOfString(x.MonthsUnlocked) + if !f(fd_GenesisState_months_unlocked, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "mint.v5.GenesisState.params": + return x.Params != nil + case "mint.v5.GenesisState.previous_reward_emission_per_unit_staked_token": + return x.PreviousRewardEmissionPerUnitStakedToken != "" + case "mint.v5.GenesisState.previous_block_emission": + return x.PreviousBlockEmission != "" + case "mint.v5.GenesisState.ecosystem_tokens_minted": + return x.EcosystemTokensMinted != "" + case "mint.v5.GenesisState.months_unlocked": + return x.MonthsUnlocked != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.GenesisState")) + } + panic(fmt.Errorf("message mint.v5.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "mint.v5.GenesisState.params": + x.Params = nil + case "mint.v5.GenesisState.previous_reward_emission_per_unit_staked_token": + x.PreviousRewardEmissionPerUnitStakedToken = "" + case "mint.v5.GenesisState.previous_block_emission": + x.PreviousBlockEmission = "" + case "mint.v5.GenesisState.ecosystem_tokens_minted": + x.EcosystemTokensMinted = "" + case "mint.v5.GenesisState.months_unlocked": + x.MonthsUnlocked = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.GenesisState")) + } + panic(fmt.Errorf("message mint.v5.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "mint.v5.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "mint.v5.GenesisState.previous_reward_emission_per_unit_staked_token": + value := x.PreviousRewardEmissionPerUnitStakedToken + return protoreflect.ValueOfString(value) + case "mint.v5.GenesisState.previous_block_emission": + value := x.PreviousBlockEmission + return protoreflect.ValueOfString(value) + case "mint.v5.GenesisState.ecosystem_tokens_minted": + value := x.EcosystemTokensMinted + return protoreflect.ValueOfString(value) + case "mint.v5.GenesisState.months_unlocked": + value := x.MonthsUnlocked + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.GenesisState")) + } + panic(fmt.Errorf("message mint.v5.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "mint.v5.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + case "mint.v5.GenesisState.previous_reward_emission_per_unit_staked_token": + x.PreviousRewardEmissionPerUnitStakedToken = value.Interface().(string) + case "mint.v5.GenesisState.previous_block_emission": + x.PreviousBlockEmission = value.Interface().(string) + case "mint.v5.GenesisState.ecosystem_tokens_minted": + x.EcosystemTokensMinted = value.Interface().(string) + case "mint.v5.GenesisState.months_unlocked": + x.MonthsUnlocked = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.GenesisState")) + } + panic(fmt.Errorf("message mint.v5.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "mint.v5.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "mint.v5.GenesisState.previous_reward_emission_per_unit_staked_token": + panic(fmt.Errorf("field previous_reward_emission_per_unit_staked_token of message mint.v5.GenesisState is not mutable")) + case "mint.v5.GenesisState.previous_block_emission": + panic(fmt.Errorf("field previous_block_emission of message mint.v5.GenesisState is not mutable")) + case "mint.v5.GenesisState.ecosystem_tokens_minted": + panic(fmt.Errorf("field ecosystem_tokens_minted of message mint.v5.GenesisState is not mutable")) + case "mint.v5.GenesisState.months_unlocked": + panic(fmt.Errorf("field months_unlocked of message mint.v5.GenesisState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.GenesisState")) + } + panic(fmt.Errorf("message mint.v5.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "mint.v5.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "mint.v5.GenesisState.previous_reward_emission_per_unit_staked_token": + return protoreflect.ValueOfString("") + case "mint.v5.GenesisState.previous_block_emission": + return protoreflect.ValueOfString("") + case "mint.v5.GenesisState.ecosystem_tokens_minted": + return protoreflect.ValueOfString("") + case "mint.v5.GenesisState.months_unlocked": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.GenesisState")) + } + panic(fmt.Errorf("message mint.v5.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in mint.v5.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PreviousRewardEmissionPerUnitStakedToken) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PreviousBlockEmission) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.EcosystemTokensMinted) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MonthsUnlocked) + 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().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.MonthsUnlocked) > 0 { + i -= len(x.MonthsUnlocked) + copy(dAtA[i:], x.MonthsUnlocked) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MonthsUnlocked))) + i-- + dAtA[i] = 0x2a + } + if len(x.EcosystemTokensMinted) > 0 { + i -= len(x.EcosystemTokensMinted) + copy(dAtA[i:], x.EcosystemTokensMinted) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EcosystemTokensMinted))) + i-- + dAtA[i] = 0x22 + } + if len(x.PreviousBlockEmission) > 0 { + i -= len(x.PreviousBlockEmission) + copy(dAtA[i:], x.PreviousBlockEmission) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PreviousBlockEmission))) + i-- + dAtA[i] = 0x1a + } + if len(x.PreviousRewardEmissionPerUnitStakedToken) > 0 { + i -= len(x.PreviousRewardEmissionPerUnitStakedToken) + copy(dAtA[i:], x.PreviousRewardEmissionPerUnitStakedToken) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PreviousRewardEmissionPerUnitStakedToken))) + i-- + 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 { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousRewardEmissionPerUnitStakedToken", 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.PreviousRewardEmissionPerUnitStakedToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PreviousBlockEmission", 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.PreviousBlockEmission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EcosystemTokensMinted", 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.EcosystemTokensMinted = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MonthsUnlocked", 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.MonthsUnlocked = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: mint/v5/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the mint module's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines all the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // previous target emission rewards per unit staked token + PreviousRewardEmissionPerUnitStakedToken string `protobuf:"bytes,2,opt,name=previous_reward_emission_per_unit_staked_token,json=previousRewardEmissionPerUnitStakedToken,proto3" json:"previous_reward_emission_per_unit_staked_token,omitempty"` + PreviousBlockEmission string `protobuf:"bytes,3,opt,name=previous_block_emission,json=previousBlockEmission,proto3" json:"previous_block_emission,omitempty"` + // number of tokens minted into the ecosystem treasury + EcosystemTokensMinted string `protobuf:"bytes,4,opt,name=ecosystem_tokens_minted,json=ecosystemTokensMinted,proto3" json:"ecosystem_tokens_minted,omitempty"` + // number of months already unlocked for investor token vesting purposes + MonthsUnlocked string `protobuf:"bytes,5,opt,name=months_unlocked,json=monthsUnlocked,proto3" json:"months_unlocked,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_mint_v5_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_mint_v5_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *GenesisState) GetPreviousRewardEmissionPerUnitStakedToken() string { + if x != nil { + return x.PreviousRewardEmissionPerUnitStakedToken + } + return "" +} + +func (x *GenesisState) GetPreviousBlockEmission() string { + if x != nil { + return x.PreviousBlockEmission + } + return "" +} + +func (x *GenesisState) GetEcosystemTokensMinted() string { + if x != nil { + return x.EcosystemTokensMinted + } + return "" +} + +func (x *GenesisState) GetMonthsUnlocked() string { + if x != nil { + return x.MonthsUnlocked + } + return "" +} + +var File_mint_v5_genesis_proto protoreflect.FileDescriptor + +var file_mint_v5_genesis_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x35, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x35, + 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, + 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x35, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x04, 0x0a, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x69, 0x6e, + 0x74, 0x2e, 0x76, 0x35, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x9e, + 0x01, 0x0a, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x5f, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, + 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, + 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x10, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x28, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, + 0x55, 0x6e, 0x69, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x68, 0x0a, 0x17, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x68, 0x0a, 0x17, 0x65, 0x63, 0x6f, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x6d, 0x69, + 0x6e, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x15, 0x65, 0x63, + 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4d, 0x69, 0x6e, + 0x74, 0x65, 0x64, 0x12, 0x59, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x5f, 0x75, 0x6e, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, + 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x9a, + 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x35, 0x42, 0x0c, + 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, + 0x61, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, + 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x35, 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x35, + 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x35, + 0xca, 0x02, 0x07, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x35, 0xe2, 0x02, 0x13, 0x4d, 0x69, 0x6e, + 0x74, 0x5c, 0x56, 0x35, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x08, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x35, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_mint_v5_genesis_proto_rawDescOnce sync.Once + file_mint_v5_genesis_proto_rawDescData = file_mint_v5_genesis_proto_rawDesc +) + +func file_mint_v5_genesis_proto_rawDescGZIP() []byte { + file_mint_v5_genesis_proto_rawDescOnce.Do(func() { + file_mint_v5_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_mint_v5_genesis_proto_rawDescData) + }) + return file_mint_v5_genesis_proto_rawDescData +} + +var file_mint_v5_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_mint_v5_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: mint.v5.GenesisState + (*Params)(nil), // 1: mint.v5.Params +} +var file_mint_v5_genesis_proto_depIdxs = []int32{ + 1, // 0: mint.v5.GenesisState.params:type_name -> mint.v5.Params + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_mint_v5_genesis_proto_init() } +func file_mint_v5_genesis_proto_init() { + if File_mint_v5_genesis_proto != nil { + return + } + file_mint_v5_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_mint_v5_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mint_v5_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mint_v5_genesis_proto_goTypes, + DependencyIndexes: file_mint_v5_genesis_proto_depIdxs, + MessageInfos: file_mint_v5_genesis_proto_msgTypes, + }.Build() + File_mint_v5_genesis_proto = out.File + file_mint_v5_genesis_proto_rawDesc = nil + file_mint_v5_genesis_proto_goTypes = nil + file_mint_v5_genesis_proto_depIdxs = nil +} diff --git a/x/mint/api/mint/v5/types.pulsar.go b/x/mint/api/mint/v5/types.pulsar.go new file mode 100644 index 000000000..61ed451dc --- /dev/null +++ b/x/mint/api/mint/v5/types.pulsar.go @@ -0,0 +1,1459 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package mintv5 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_mint_denom protoreflect.FieldDescriptor + fd_Params_max_supply protoreflect.FieldDescriptor + fd_Params_f_emission protoreflect.FieldDescriptor + fd_Params_one_month_smoothing_degree protoreflect.FieldDescriptor + fd_Params_ecosystem_treasury_percent_of_total_supply protoreflect.FieldDescriptor + fd_Params_foundation_treasury_percent_of_total_supply protoreflect.FieldDescriptor + fd_Params_participants_percent_of_total_supply protoreflect.FieldDescriptor + fd_Params_investors_percent_of_total_supply protoreflect.FieldDescriptor + fd_Params_team_percent_of_total_supply protoreflect.FieldDescriptor + fd_Params_maximum_monthly_percentage_yield protoreflect.FieldDescriptor + fd_Params_investors_preseed_percent_of_total_supply protoreflect.FieldDescriptor + fd_Params_emission_enabled protoreflect.FieldDescriptor +) + +func init() { + file_mint_v5_types_proto_init() + md_Params = File_mint_v5_types_proto.Messages().ByName("Params") + fd_Params_mint_denom = md_Params.Fields().ByName("mint_denom") + fd_Params_max_supply = md_Params.Fields().ByName("max_supply") + fd_Params_f_emission = md_Params.Fields().ByName("f_emission") + fd_Params_one_month_smoothing_degree = md_Params.Fields().ByName("one_month_smoothing_degree") + fd_Params_ecosystem_treasury_percent_of_total_supply = md_Params.Fields().ByName("ecosystem_treasury_percent_of_total_supply") + fd_Params_foundation_treasury_percent_of_total_supply = md_Params.Fields().ByName("foundation_treasury_percent_of_total_supply") + fd_Params_participants_percent_of_total_supply = md_Params.Fields().ByName("participants_percent_of_total_supply") + fd_Params_investors_percent_of_total_supply = md_Params.Fields().ByName("investors_percent_of_total_supply") + fd_Params_team_percent_of_total_supply = md_Params.Fields().ByName("team_percent_of_total_supply") + fd_Params_maximum_monthly_percentage_yield = md_Params.Fields().ByName("maximum_monthly_percentage_yield") + fd_Params_investors_preseed_percent_of_total_supply = md_Params.Fields().ByName("investors_preseed_percent_of_total_supply") + fd_Params_emission_enabled = md_Params.Fields().ByName("emission_enabled") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_mint_v5_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MintDenom != "" { + value := protoreflect.ValueOfString(x.MintDenom) + if !f(fd_Params_mint_denom, value) { + return + } + } + if x.MaxSupply != "" { + value := protoreflect.ValueOfString(x.MaxSupply) + if !f(fd_Params_max_supply, value) { + return + } + } + if x.FEmission != "" { + value := protoreflect.ValueOfString(x.FEmission) + if !f(fd_Params_f_emission, value) { + return + } + } + if x.OneMonthSmoothingDegree != "" { + value := protoreflect.ValueOfString(x.OneMonthSmoothingDegree) + if !f(fd_Params_one_month_smoothing_degree, value) { + return + } + } + if x.EcosystemTreasuryPercentOfTotalSupply != "" { + value := protoreflect.ValueOfString(x.EcosystemTreasuryPercentOfTotalSupply) + if !f(fd_Params_ecosystem_treasury_percent_of_total_supply, value) { + return + } + } + if x.FoundationTreasuryPercentOfTotalSupply != "" { + value := protoreflect.ValueOfString(x.FoundationTreasuryPercentOfTotalSupply) + if !f(fd_Params_foundation_treasury_percent_of_total_supply, value) { + return + } + } + if x.ParticipantsPercentOfTotalSupply != "" { + value := protoreflect.ValueOfString(x.ParticipantsPercentOfTotalSupply) + if !f(fd_Params_participants_percent_of_total_supply, value) { + return + } + } + if x.InvestorsPercentOfTotalSupply != "" { + value := protoreflect.ValueOfString(x.InvestorsPercentOfTotalSupply) + if !f(fd_Params_investors_percent_of_total_supply, value) { + return + } + } + if x.TeamPercentOfTotalSupply != "" { + value := protoreflect.ValueOfString(x.TeamPercentOfTotalSupply) + if !f(fd_Params_team_percent_of_total_supply, value) { + return + } + } + if x.MaximumMonthlyPercentageYield != "" { + value := protoreflect.ValueOfString(x.MaximumMonthlyPercentageYield) + if !f(fd_Params_maximum_monthly_percentage_yield, value) { + return + } + } + if x.InvestorsPreseedPercentOfTotalSupply != "" { + value := protoreflect.ValueOfString(x.InvestorsPreseedPercentOfTotalSupply) + if !f(fd_Params_investors_preseed_percent_of_total_supply, value) { + return + } + } + if x.EmissionEnabled != false { + value := protoreflect.ValueOfBool(x.EmissionEnabled) + if !f(fd_Params_emission_enabled, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "mint.v5.Params.mint_denom": + return x.MintDenom != "" + case "mint.v5.Params.max_supply": + return x.MaxSupply != "" + case "mint.v5.Params.f_emission": + return x.FEmission != "" + case "mint.v5.Params.one_month_smoothing_degree": + return x.OneMonthSmoothingDegree != "" + case "mint.v5.Params.ecosystem_treasury_percent_of_total_supply": + return x.EcosystemTreasuryPercentOfTotalSupply != "" + case "mint.v5.Params.foundation_treasury_percent_of_total_supply": + return x.FoundationTreasuryPercentOfTotalSupply != "" + case "mint.v5.Params.participants_percent_of_total_supply": + return x.ParticipantsPercentOfTotalSupply != "" + case "mint.v5.Params.investors_percent_of_total_supply": + return x.InvestorsPercentOfTotalSupply != "" + case "mint.v5.Params.team_percent_of_total_supply": + return x.TeamPercentOfTotalSupply != "" + case "mint.v5.Params.maximum_monthly_percentage_yield": + return x.MaximumMonthlyPercentageYield != "" + case "mint.v5.Params.investors_preseed_percent_of_total_supply": + return x.InvestorsPreseedPercentOfTotalSupply != "" + case "mint.v5.Params.emission_enabled": + return x.EmissionEnabled != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.Params")) + } + panic(fmt.Errorf("message mint.v5.Params does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "mint.v5.Params.mint_denom": + x.MintDenom = "" + case "mint.v5.Params.max_supply": + x.MaxSupply = "" + case "mint.v5.Params.f_emission": + x.FEmission = "" + case "mint.v5.Params.one_month_smoothing_degree": + x.OneMonthSmoothingDegree = "" + case "mint.v5.Params.ecosystem_treasury_percent_of_total_supply": + x.EcosystemTreasuryPercentOfTotalSupply = "" + case "mint.v5.Params.foundation_treasury_percent_of_total_supply": + x.FoundationTreasuryPercentOfTotalSupply = "" + case "mint.v5.Params.participants_percent_of_total_supply": + x.ParticipantsPercentOfTotalSupply = "" + case "mint.v5.Params.investors_percent_of_total_supply": + x.InvestorsPercentOfTotalSupply = "" + case "mint.v5.Params.team_percent_of_total_supply": + x.TeamPercentOfTotalSupply = "" + case "mint.v5.Params.maximum_monthly_percentage_yield": + x.MaximumMonthlyPercentageYield = "" + case "mint.v5.Params.investors_preseed_percent_of_total_supply": + x.InvestorsPreseedPercentOfTotalSupply = "" + case "mint.v5.Params.emission_enabled": + x.EmissionEnabled = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.Params")) + } + panic(fmt.Errorf("message mint.v5.Params does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "mint.v5.Params.mint_denom": + value := x.MintDenom + return protoreflect.ValueOfString(value) + case "mint.v5.Params.max_supply": + value := x.MaxSupply + return protoreflect.ValueOfString(value) + case "mint.v5.Params.f_emission": + value := x.FEmission + return protoreflect.ValueOfString(value) + case "mint.v5.Params.one_month_smoothing_degree": + value := x.OneMonthSmoothingDegree + return protoreflect.ValueOfString(value) + case "mint.v5.Params.ecosystem_treasury_percent_of_total_supply": + value := x.EcosystemTreasuryPercentOfTotalSupply + return protoreflect.ValueOfString(value) + case "mint.v5.Params.foundation_treasury_percent_of_total_supply": + value := x.FoundationTreasuryPercentOfTotalSupply + return protoreflect.ValueOfString(value) + case "mint.v5.Params.participants_percent_of_total_supply": + value := x.ParticipantsPercentOfTotalSupply + return protoreflect.ValueOfString(value) + case "mint.v5.Params.investors_percent_of_total_supply": + value := x.InvestorsPercentOfTotalSupply + return protoreflect.ValueOfString(value) + case "mint.v5.Params.team_percent_of_total_supply": + value := x.TeamPercentOfTotalSupply + return protoreflect.ValueOfString(value) + case "mint.v5.Params.maximum_monthly_percentage_yield": + value := x.MaximumMonthlyPercentageYield + return protoreflect.ValueOfString(value) + case "mint.v5.Params.investors_preseed_percent_of_total_supply": + value := x.InvestorsPreseedPercentOfTotalSupply + return protoreflect.ValueOfString(value) + case "mint.v5.Params.emission_enabled": + value := x.EmissionEnabled + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.Params")) + } + panic(fmt.Errorf("message mint.v5.Params does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "mint.v5.Params.mint_denom": + x.MintDenom = value.Interface().(string) + case "mint.v5.Params.max_supply": + x.MaxSupply = value.Interface().(string) + case "mint.v5.Params.f_emission": + x.FEmission = value.Interface().(string) + case "mint.v5.Params.one_month_smoothing_degree": + x.OneMonthSmoothingDegree = value.Interface().(string) + case "mint.v5.Params.ecosystem_treasury_percent_of_total_supply": + x.EcosystemTreasuryPercentOfTotalSupply = value.Interface().(string) + case "mint.v5.Params.foundation_treasury_percent_of_total_supply": + x.FoundationTreasuryPercentOfTotalSupply = value.Interface().(string) + case "mint.v5.Params.participants_percent_of_total_supply": + x.ParticipantsPercentOfTotalSupply = value.Interface().(string) + case "mint.v5.Params.investors_percent_of_total_supply": + x.InvestorsPercentOfTotalSupply = value.Interface().(string) + case "mint.v5.Params.team_percent_of_total_supply": + x.TeamPercentOfTotalSupply = value.Interface().(string) + case "mint.v5.Params.maximum_monthly_percentage_yield": + x.MaximumMonthlyPercentageYield = value.Interface().(string) + case "mint.v5.Params.investors_preseed_percent_of_total_supply": + x.InvestorsPreseedPercentOfTotalSupply = value.Interface().(string) + case "mint.v5.Params.emission_enabled": + x.EmissionEnabled = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.Params")) + } + panic(fmt.Errorf("message mint.v5.Params does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "mint.v5.Params.mint_denom": + panic(fmt.Errorf("field mint_denom of message mint.v5.Params is not mutable")) + case "mint.v5.Params.max_supply": + panic(fmt.Errorf("field max_supply of message mint.v5.Params is not mutable")) + case "mint.v5.Params.f_emission": + panic(fmt.Errorf("field f_emission of message mint.v5.Params is not mutable")) + case "mint.v5.Params.one_month_smoothing_degree": + panic(fmt.Errorf("field one_month_smoothing_degree of message mint.v5.Params is not mutable")) + case "mint.v5.Params.ecosystem_treasury_percent_of_total_supply": + panic(fmt.Errorf("field ecosystem_treasury_percent_of_total_supply of message mint.v5.Params is not mutable")) + case "mint.v5.Params.foundation_treasury_percent_of_total_supply": + panic(fmt.Errorf("field foundation_treasury_percent_of_total_supply of message mint.v5.Params is not mutable")) + case "mint.v5.Params.participants_percent_of_total_supply": + panic(fmt.Errorf("field participants_percent_of_total_supply of message mint.v5.Params is not mutable")) + case "mint.v5.Params.investors_percent_of_total_supply": + panic(fmt.Errorf("field investors_percent_of_total_supply of message mint.v5.Params is not mutable")) + case "mint.v5.Params.team_percent_of_total_supply": + panic(fmt.Errorf("field team_percent_of_total_supply of message mint.v5.Params is not mutable")) + case "mint.v5.Params.maximum_monthly_percentage_yield": + panic(fmt.Errorf("field maximum_monthly_percentage_yield of message mint.v5.Params is not mutable")) + case "mint.v5.Params.investors_preseed_percent_of_total_supply": + panic(fmt.Errorf("field investors_preseed_percent_of_total_supply of message mint.v5.Params is not mutable")) + case "mint.v5.Params.emission_enabled": + panic(fmt.Errorf("field emission_enabled of message mint.v5.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.Params")) + } + panic(fmt.Errorf("message mint.v5.Params does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "mint.v5.Params.mint_denom": + return protoreflect.ValueOfString("") + case "mint.v5.Params.max_supply": + return protoreflect.ValueOfString("") + case "mint.v5.Params.f_emission": + return protoreflect.ValueOfString("") + case "mint.v5.Params.one_month_smoothing_degree": + return protoreflect.ValueOfString("") + case "mint.v5.Params.ecosystem_treasury_percent_of_total_supply": + return protoreflect.ValueOfString("") + case "mint.v5.Params.foundation_treasury_percent_of_total_supply": + return protoreflect.ValueOfString("") + case "mint.v5.Params.participants_percent_of_total_supply": + return protoreflect.ValueOfString("") + case "mint.v5.Params.investors_percent_of_total_supply": + return protoreflect.ValueOfString("") + case "mint.v5.Params.team_percent_of_total_supply": + return protoreflect.ValueOfString("") + case "mint.v5.Params.maximum_monthly_percentage_yield": + return protoreflect.ValueOfString("") + case "mint.v5.Params.investors_preseed_percent_of_total_supply": + return protoreflect.ValueOfString("") + case "mint.v5.Params.emission_enabled": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: mint.v5.Params")) + } + panic(fmt.Errorf("message mint.v5.Params does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in mint.v5.Params", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Params) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.MintDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaxSupply) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.FEmission) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OneMonthSmoothingDegree) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.EcosystemTreasuryPercentOfTotalSupply) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.FoundationTreasuryPercentOfTotalSupply) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ParticipantsPercentOfTotalSupply) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.InvestorsPercentOfTotalSupply) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.TeamPercentOfTotalSupply) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MaximumMonthlyPercentageYield) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.InvestorsPreseedPercentOfTotalSupply) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.EmissionEnabled { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.EmissionEnabled { + i-- + if x.EmissionEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if len(x.InvestorsPreseedPercentOfTotalSupply) > 0 { + i -= len(x.InvestorsPreseedPercentOfTotalSupply) + copy(dAtA[i:], x.InvestorsPreseedPercentOfTotalSupply) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvestorsPreseedPercentOfTotalSupply))) + i-- + dAtA[i] = 0x5a + } + if len(x.MaximumMonthlyPercentageYield) > 0 { + i -= len(x.MaximumMonthlyPercentageYield) + copy(dAtA[i:], x.MaximumMonthlyPercentageYield) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaximumMonthlyPercentageYield))) + i-- + dAtA[i] = 0x52 + } + if len(x.TeamPercentOfTotalSupply) > 0 { + i -= len(x.TeamPercentOfTotalSupply) + copy(dAtA[i:], x.TeamPercentOfTotalSupply) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TeamPercentOfTotalSupply))) + i-- + dAtA[i] = 0x4a + } + if len(x.InvestorsPercentOfTotalSupply) > 0 { + i -= len(x.InvestorsPercentOfTotalSupply) + copy(dAtA[i:], x.InvestorsPercentOfTotalSupply) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InvestorsPercentOfTotalSupply))) + i-- + dAtA[i] = 0x42 + } + if len(x.ParticipantsPercentOfTotalSupply) > 0 { + i -= len(x.ParticipantsPercentOfTotalSupply) + copy(dAtA[i:], x.ParticipantsPercentOfTotalSupply) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ParticipantsPercentOfTotalSupply))) + i-- + dAtA[i] = 0x3a + } + if len(x.FoundationTreasuryPercentOfTotalSupply) > 0 { + i -= len(x.FoundationTreasuryPercentOfTotalSupply) + copy(dAtA[i:], x.FoundationTreasuryPercentOfTotalSupply) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FoundationTreasuryPercentOfTotalSupply))) + i-- + dAtA[i] = 0x32 + } + if len(x.EcosystemTreasuryPercentOfTotalSupply) > 0 { + i -= len(x.EcosystemTreasuryPercentOfTotalSupply) + copy(dAtA[i:], x.EcosystemTreasuryPercentOfTotalSupply) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EcosystemTreasuryPercentOfTotalSupply))) + i-- + dAtA[i] = 0x2a + } + if len(x.OneMonthSmoothingDegree) > 0 { + i -= len(x.OneMonthSmoothingDegree) + copy(dAtA[i:], x.OneMonthSmoothingDegree) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OneMonthSmoothingDegree))) + i-- + dAtA[i] = 0x22 + } + if len(x.FEmission) > 0 { + i -= len(x.FEmission) + copy(dAtA[i:], x.FEmission) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FEmission))) + i-- + dAtA[i] = 0x1a + } + if len(x.MaxSupply) > 0 { + i -= len(x.MaxSupply) + copy(dAtA[i:], x.MaxSupply) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxSupply))) + i-- + dAtA[i] = 0x12 + } + if len(x.MintDenom) > 0 { + i -= len(x.MintDenom) + copy(dAtA[i:], x.MintDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MintDenom))) + 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().(*Params) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MintDenom", 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.MintDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxSupply", 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.MaxSupply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FEmission", 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.FEmission = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OneMonthSmoothingDegree", 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.OneMonthSmoothingDegree = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EcosystemTreasuryPercentOfTotalSupply", 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.EcosystemTreasuryPercentOfTotalSupply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FoundationTreasuryPercentOfTotalSupply", 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.FoundationTreasuryPercentOfTotalSupply = 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 ParticipantsPercentOfTotalSupply", 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.ParticipantsPercentOfTotalSupply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvestorsPercentOfTotalSupply", 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.InvestorsPercentOfTotalSupply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TeamPercentOfTotalSupply", 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.TeamPercentOfTotalSupply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaximumMonthlyPercentageYield", 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.MaximumMonthlyPercentageYield = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InvestorsPreseedPercentOfTotalSupply", 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.InvestorsPreseedPercentOfTotalSupply = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EmissionEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.EmissionEnabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: mint/v5/types.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Params defines the parameters for the x/mint module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // type of coin to mint + MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` + // maximum total supply of the coin + MaxSupply string `protobuf:"bytes,2,opt,name=max_supply,json=maxSupply,proto3" json:"max_supply,omitempty"` + // ecosystem treasury fraction ideally emitted per unit time + FEmission string `protobuf:"bytes,3,opt,name=f_emission,json=fEmission,proto3" json:"f_emission,omitempty"` + // one month exponential moving average smoothing factor, alpha_e in the paper + OneMonthSmoothingDegree string `protobuf:"bytes,4,opt,name=one_month_smoothing_degree,json=oneMonthSmoothingDegree,proto3" json:"one_month_smoothing_degree,omitempty"` + // percentage of the total supply is reserved and locked in the ecosystem + // treasury + EcosystemTreasuryPercentOfTotalSupply string `protobuf:"bytes,5,opt,name=ecosystem_treasury_percent_of_total_supply,json=ecosystemTreasuryPercentOfTotalSupply,proto3" json:"ecosystem_treasury_percent_of_total_supply,omitempty"` + // percentage of the total supply that is unlocked and usable in the + // foundation treasury + FoundationTreasuryPercentOfTotalSupply string `protobuf:"bytes,6,opt,name=foundation_treasury_percent_of_total_supply,json=foundationTreasuryPercentOfTotalSupply,proto3" json:"foundation_treasury_percent_of_total_supply,omitempty"` + // percentage of the total supply that is unlocked and usable by partipicants + // at the genesis + ParticipantsPercentOfTotalSupply string `protobuf:"bytes,7,opt,name=participants_percent_of_total_supply,json=participantsPercentOfTotalSupply,proto3" json:"participants_percent_of_total_supply,omitempty"` + // percentage of the total supply that is locked in the investors bucket at + // the genesis + InvestorsPercentOfTotalSupply string `protobuf:"bytes,8,opt,name=investors_percent_of_total_supply,json=investorsPercentOfTotalSupply,proto3" json:"investors_percent_of_total_supply,omitempty"` + // percentage of the total supply that is locked in the team bucket at the + // genesis + TeamPercentOfTotalSupply string `protobuf:"bytes,9,opt,name=team_percent_of_total_supply,json=teamPercentOfTotalSupply,proto3" json:"team_percent_of_total_supply,omitempty"` + // The capped max monthly percentage yield (like %APY) + MaximumMonthlyPercentageYield string `protobuf:"bytes,10,opt,name=maximum_monthly_percentage_yield,json=maximumMonthlyPercentageYield,proto3" json:"maximum_monthly_percentage_yield,omitempty"` + // percentage of the total supply that is locked in the preseed investors + // bucket at the genesis + InvestorsPreseedPercentOfTotalSupply string `protobuf:"bytes,11,opt,name=investors_preseed_percent_of_total_supply,json=investorsPreseedPercentOfTotalSupply,proto3" json:"investors_preseed_percent_of_total_supply,omitempty"` + // Whether or not the network is allowed to emit any rewards + // Must be set to true to allow the network to pay out rewards. + EmissionEnabled bool `protobuf:"varint,12,opt,name=emission_enabled,json=emissionEnabled,proto3" json:"emission_enabled,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_mint_v5_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_mint_v5_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Params) GetMintDenom() string { + if x != nil { + return x.MintDenom + } + return "" +} + +func (x *Params) GetMaxSupply() string { + if x != nil { + return x.MaxSupply + } + return "" +} + +func (x *Params) GetFEmission() string { + if x != nil { + return x.FEmission + } + return "" +} + +func (x *Params) GetOneMonthSmoothingDegree() string { + if x != nil { + return x.OneMonthSmoothingDegree + } + return "" +} + +func (x *Params) GetEcosystemTreasuryPercentOfTotalSupply() string { + if x != nil { + return x.EcosystemTreasuryPercentOfTotalSupply + } + return "" +} + +func (x *Params) GetFoundationTreasuryPercentOfTotalSupply() string { + if x != nil { + return x.FoundationTreasuryPercentOfTotalSupply + } + return "" +} + +func (x *Params) GetParticipantsPercentOfTotalSupply() string { + if x != nil { + return x.ParticipantsPercentOfTotalSupply + } + return "" +} + +func (x *Params) GetInvestorsPercentOfTotalSupply() string { + if x != nil { + return x.InvestorsPercentOfTotalSupply + } + return "" +} + +func (x *Params) GetTeamPercentOfTotalSupply() string { + if x != nil { + return x.TeamPercentOfTotalSupply + } + return "" +} + +func (x *Params) GetMaximumMonthlyPercentageYield() string { + if x != nil { + return x.MaximumMonthlyPercentageYield + } + return "" +} + +func (x *Params) GetInvestorsPreseedPercentOfTotalSupply() string { + if x != nil { + return x.InvestorsPreseedPercentOfTotalSupply + } + return "" +} + +func (x *Params) GetEmissionEnabled() bool { + if x != nil { + return x.EmissionEnabled + } + return false +} + +var File_mint_v5_types_proto protoreflect.FileDescriptor + +var file_mint_v5_types_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x35, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x35, 0x1a, 0x11, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x88, 0x0b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x4f, 0x0a, 0x0a, + 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, + 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x5b, 0x0a, + 0x0a, 0x66, 0x5f, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x09, 0x66, 0x45, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x1a, 0x6f, 0x6e, + 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x5f, 0x73, 0x6d, 0x6f, 0x6f, 0x74, 0x68, 0x69, 0x6e, + 0x67, 0x5f, 0x64, 0x65, 0x67, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, + 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x17, 0x6f, 0x6e, + 0x65, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x53, 0x6d, 0x6f, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x44, + 0x65, 0x67, 0x72, 0x65, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x2a, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x5f, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, + 0x70, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, + 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x25, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, + 0x99, 0x01, 0x0a, 0x2b, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, + 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, + 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x10, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x26, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x24, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, + 0x70, 0x70, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, + 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, + 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, + 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x86, 0x01, 0x0a, 0x21, 0x69, + 0x6e, 0x76, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, + 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x10, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x1d, 0x69, 0x6e, 0x76, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, + 0x70, 0x6c, 0x79, 0x12, 0x7c, 0x0a, 0x1c, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x70, + 0x70, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, 0x1f, 0x00, 0xda, + 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, + 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, + 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x18, 0x74, 0x65, 0x61, 0x6d, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, + 0x79, 0x12, 0x85, 0x01, 0x0a, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6d, 0x6f, + 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x5f, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, 0xde, + 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, + 0x63, 0xd2, 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, + 0x63, 0x79, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x1d, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x59, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x95, 0x01, 0x0a, 0x29, 0x69, 0x6e, + 0x76, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x65, 0x64, 0x5f, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3c, 0xc8, + 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, + 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x24, 0x69, 0x6e, 0x76, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x50, 0x72, 0x65, 0x73, 0x65, 0x65, 0x64, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x70, 0x70, 0x6c, + 0x79, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x1f, 0x8a, 0xe7, + 0xb0, 0x2a, 0x1a, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x78, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x98, 0x01, + 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x35, 0x42, 0x0a, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x72, 0x61, 0x2d, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x78, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x35, 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x35, 0xa2, 0x02, 0x03, + 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x4d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x35, 0xca, 0x02, 0x07, + 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x35, 0xe2, 0x02, 0x13, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, + 0x35, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, + 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x35, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mint_v5_types_proto_rawDescOnce sync.Once + file_mint_v5_types_proto_rawDescData = file_mint_v5_types_proto_rawDesc +) + +func file_mint_v5_types_proto_rawDescGZIP() []byte { + file_mint_v5_types_proto_rawDescOnce.Do(func() { + file_mint_v5_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_mint_v5_types_proto_rawDescData) + }) + return file_mint_v5_types_proto_rawDescData +} + +var file_mint_v5_types_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_mint_v5_types_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: mint.v5.Params +} +var file_mint_v5_types_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_mint_v5_types_proto_init() } +func file_mint_v5_types_proto_init() { + if File_mint_v5_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mint_v5_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mint_v5_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mint_v5_types_proto_goTypes, + DependencyIndexes: file_mint_v5_types_proto_depIdxs, + MessageInfos: file_mint_v5_types_proto_msgTypes, + }.Build() + File_mint_v5_types_proto = out.File + file_mint_v5_types_proto_rawDesc = nil + file_mint_v5_types_proto_goTypes = nil + file_mint_v5_types_proto_depIdxs = nil +} diff --git a/x/mint/migrations/v5/migrate.go b/x/mint/migrations/v5/migrate.go new file mode 100644 index 000000000..f7e204953 --- /dev/null +++ b/x/mint/migrations/v5/migrate.go @@ -0,0 +1,36 @@ +package v5 + +import ( + "github.com/allora-network/allora-chain/x/mint/keeper" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// migrate the store from version 4 to version 5 +func MigrateStore(ctx sdk.Context, mintKeeper keeper.Keeper) error { + ctx.Logger().Info("MIGRATING MINT MODULE FROM VERSION 4 TO VERSION 5") + return migrateParams(ctx, mintKeeper) +} + +// We add an additional boolean param that controls +// whether or not emissions is turned on +// For an already running network it should just be turned on +func migrateParams(ctx sdk.Context, mintKeeper keeper.Keeper) error { + ctx.Logger().Info("MIGRATING MINT MODULE PARAMS FROM VERSION 4 TO VERSION 5") + + params, err := mintKeeper.Params.Get(ctx) + if err != nil { + ctx.Logger().Error("failed to get current params from keeper", "error", err) + return err + } + + // set the emission enabled param to true by default + params.EmissionEnabled = true + + err = mintKeeper.Params.Set(ctx, params) + if err != nil { + ctx.Logger().Error("failed to set updated params in keeper", "error", err) + return err + } + + return nil +} diff --git a/x/mint/migrations/v5/migrate_test.go b/x/mint/migrations/v5/migrate_test.go new file mode 100644 index 000000000..ab98895fc --- /dev/null +++ b/x/mint/migrations/v5/migrate_test.go @@ -0,0 +1,120 @@ +package v5_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/golang/mock/gomock" + + "cosmossdk.io/core/store" + minttestutil "github.com/allora-network/allora-chain/x/mint/testutil" + "github.com/allora-network/allora-chain/x/mint/types" + + "github.com/allora-network/allora-chain/x/mint/keeper" + mint "github.com/allora-network/allora-chain/x/mint/module" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + + v5 "github.com/allora-network/allora-chain/x/mint/migrations/v5" + minttypes "github.com/allora-network/allora-chain/x/mint/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + + storetypes "cosmossdk.io/store/types" + oldV4Types "github.com/allora-network/allora-chain/x/mint/migrations/v5/oldtypes" + cosmostestutil "github.com/cosmos/cosmos-sdk/testutil" +) + +type MintV5MigrationTestSuite struct { + suite.Suite + ctrl *gomock.Controller + + ctx sdk.Context + storeService store.KVStoreService + mintKeeper *keeper.Keeper +} + +func TestMintV5MigrationTestSuite(t *testing.T) { + suite.Run(t, new(MintV5MigrationTestSuite)) +} + +func (s *MintV5MigrationTestSuite) SetupTest() { + encCfg := moduletestutil.MakeTestEncodingConfig(mint.AppModule{}) + key := storetypes.NewKVStoreKey(minttypes.StoreKey) + storeService := runtime.NewKVStoreService(key) + s.storeService = storeService + testCtx := cosmostestutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test")) + + // gomock initializations + s.ctrl = gomock.NewController(s.T()) + accountKeeper := minttestutil.NewMockAccountKeeper(s.ctrl) + bankKeeper := minttestutil.NewMockBankKeeper(s.ctrl) + emissionsKeeper := minttestutil.NewMockEmissionsKeeper(s.ctrl) + stakingKeeper := minttestutil.NewMockStakingKeeper(s.ctrl) + accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authtypes.NewModuleAddress(types.ModuleName)) + mintKeeper := keeper.NewKeeper( + encCfg.Codec, + storeService, + stakingKeeper, + accountKeeper, + bankKeeper, + emissionsKeeper, + authtypes.FeeCollectorName, + ) + + s.ctx = testCtx.Ctx + s.storeService = storeService + s.mintKeeper = &mintKeeper +} + +// In this test we check that the mint module params have been migrated +// and the expected new fields are added and set to true: +// EmissionEnabled +func (s *MintV5MigrationTestSuite) TestMigrateParams() { + storageService := s.mintKeeper.GetStorageService() + store := runtime.KVStoreAdapter(storageService.OpenKVStore(s.ctx)) + cdc := s.mintKeeper.GetBinaryCodec() + + defaultParams := minttypes.DefaultParams() + paramsOld := oldV4Types.Params{ + MintDenom: defaultParams.MintDenom, + MaxSupply: defaultParams.MaxSupply, + FEmission: defaultParams.FEmission, + OneMonthSmoothingDegree: defaultParams.OneMonthSmoothingDegree, + EcosystemTreasuryPercentOfTotalSupply: defaultParams.EcosystemTreasuryPercentOfTotalSupply, + FoundationTreasuryPercentOfTotalSupply: defaultParams.FoundationTreasuryPercentOfTotalSupply, + ParticipantsPercentOfTotalSupply: defaultParams.ParticipantsPercentOfTotalSupply, + InvestorsPercentOfTotalSupply: defaultParams.InvestorsPercentOfTotalSupply, + TeamPercentOfTotalSupply: defaultParams.TeamPercentOfTotalSupply, + MaximumMonthlyPercentageYield: defaultParams.MaximumMonthlyPercentageYield, + InvestorsPreseedPercentOfTotalSupply: defaultParams.InvestorsPreseedPercentOfTotalSupply, + } + + store.Set(minttypes.ParamsKey, cdc.MustMarshal(¶msOld)) + + // Run migration + err := v5.MigrateStore(s.ctx, *s.mintKeeper) + s.Require().NoError(err) + + paramsExpected := defaultParams + paramsExpected.EmissionEnabled = true + + // TO BE ADDED: + // - EmissionEnabled - set to true + + params, err := s.mintKeeper.GetParams(s.ctx) + s.Require().NoError(err) + s.Require().Equal(paramsExpected.MintDenom, params.MintDenom) + s.Require().Equal(paramsExpected.MaxSupply, params.MaxSupply) + s.Require().Equal(paramsExpected.FEmission, params.FEmission) + s.Require().Equal(paramsExpected.OneMonthSmoothingDegree, params.OneMonthSmoothingDegree) + s.Require().Equal(paramsExpected.EcosystemTreasuryPercentOfTotalSupply, params.EcosystemTreasuryPercentOfTotalSupply) + s.Require().Equal(paramsExpected.FoundationTreasuryPercentOfTotalSupply, params.FoundationTreasuryPercentOfTotalSupply) + s.Require().Equal(paramsExpected.ParticipantsPercentOfTotalSupply, params.ParticipantsPercentOfTotalSupply) + s.Require().Equal(paramsExpected.InvestorsPercentOfTotalSupply, params.InvestorsPercentOfTotalSupply) + s.Require().Equal(paramsExpected.TeamPercentOfTotalSupply, params.TeamPercentOfTotalSupply) + s.Require().Equal(paramsExpected.MaximumMonthlyPercentageYield, params.MaximumMonthlyPercentageYield) + s.Require().Equal(paramsExpected.InvestorsPreseedPercentOfTotalSupply, params.InvestorsPreseedPercentOfTotalSupply) + s.Require().Equal(paramsExpected.EmissionEnabled, params.EmissionEnabled) +} diff --git a/x/mint/migrations/v5/oldtypes/types.pb.go b/x/mint/migrations/v5/oldtypes/types.pb.go new file mode 100644 index 000000000..8dc27f54c --- /dev/null +++ b/x/mint/migrations/v5/oldtypes/types.pb.go @@ -0,0 +1,833 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: mint/v1beta1/types.proto + +package types + +import ( + cosmossdk_io_math "cosmossdk.io/math" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the x/mint module. +type Params struct { + // type of coin to mint + MintDenom string `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"` + // maximum total supply of the coin + MaxSupply cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=max_supply,json=maxSupply,proto3,customtype=cosmossdk.io/math.Int" json:"max_supply"` + // ecosystem treasury fraction ideally emitted per unit time + FEmission cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=f_emission,json=fEmission,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"f_emission"` + // one month exponential moving average smoothing factor, alpha_e in the paper + OneMonthSmoothingDegree cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=one_month_smoothing_degree,json=oneMonthSmoothingDegree,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"one_month_smoothing_degree"` + // percentage of the total supply is reserved and locked in the ecosystem + // treasury + EcosystemTreasuryPercentOfTotalSupply cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=ecosystem_treasury_percent_of_total_supply,json=ecosystemTreasuryPercentOfTotalSupply,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"ecosystem_treasury_percent_of_total_supply"` + // percentage of the total supply that is unlocked and usable in the + // foundation treasury + FoundationTreasuryPercentOfTotalSupply cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=foundation_treasury_percent_of_total_supply,json=foundationTreasuryPercentOfTotalSupply,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"foundation_treasury_percent_of_total_supply"` + // percentage of the total supply that is unlocked and usable by partipicants + // at the genesis + ParticipantsPercentOfTotalSupply cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=participants_percent_of_total_supply,json=participantsPercentOfTotalSupply,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"participants_percent_of_total_supply"` + // percentage of the total supply that is locked in the investors bucket at + // the genesis + InvestorsPercentOfTotalSupply cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=investors_percent_of_total_supply,json=investorsPercentOfTotalSupply,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"investors_percent_of_total_supply"` + // percentage of the total supply that is locked in the team bucket at the + // genesis + TeamPercentOfTotalSupply cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=team_percent_of_total_supply,json=teamPercentOfTotalSupply,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"team_percent_of_total_supply"` + // The capped max monthly percentage yield (like %APY) + MaximumMonthlyPercentageYield cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=maximum_monthly_percentage_yield,json=maximumMonthlyPercentageYield,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maximum_monthly_percentage_yield"` + // percentage of the total supply that is locked in the preseed investors + // bucket at the genesis + InvestorsPreseedPercentOfTotalSupply cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=investors_preseed_percent_of_total_supply,json=investorsPreseedPercentOfTotalSupply,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"investors_preseed_percent_of_total_supply"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_010015e812760429, []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) GetMintDenom() string { + if m != nil { + return m.MintDenom + } + return "" +} + +func init() { + proto.RegisterType((*Params)(nil), "mint.v1beta1.Params") +} + +func init() { proto.RegisterFile("mint/v1beta1/types.proto", fileDescriptor_010015e812760429) } + +var fileDescriptor_010015e812760429 = []byte{ + // 577 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x73, 0xfc, 0x28, 0xe4, 0x60, 0x00, 0x0b, 0x84, 0x09, 0xd4, 0x2d, 0xa8, 0x20, 0x08, + 0x4a, 0x4c, 0xd5, 0x0d, 0x31, 0x55, 0x61, 0xa8, 0x44, 0xd4, 0xa8, 0xed, 0x02, 0x0c, 0xa7, 0x8b, + 0xfd, 0xe2, 0x9c, 0xea, 0xbb, 0x67, 0xf9, 0x2e, 0x25, 0x96, 0x58, 0x61, 0x40, 0x0c, 0x2c, 0x08, + 0xf1, 0x1f, 0x30, 0x76, 0xe8, 0x1f, 0xd1, 0xb1, 0xea, 0x84, 0x90, 0xa8, 0x50, 0x32, 0xf4, 0xdf, + 0x40, 0xfe, 0xd1, 0xb4, 0x12, 0x09, 0x2c, 0x5e, 0x2c, 0xdf, 0x7b, 0xd6, 0xf7, 0xf3, 0xd1, 0x3b, + 0xfb, 0x4c, 0x6d, 0x29, 0x94, 0x71, 0x77, 0x96, 0xbb, 0x60, 0xf8, 0xb2, 0x6b, 0x92, 0x08, 0x74, + 0x33, 0x8a, 0xd1, 0xa0, 0x75, 0x35, 0xed, 0x34, 0x8b, 0x4e, 0xed, 0x3a, 0x97, 0x42, 0xa1, 0x9b, + 0x5d, 0xf3, 0x07, 0x6a, 0xb7, 0x3d, 0xd4, 0x12, 0x35, 0xcb, 0x56, 0x6e, 0xbe, 0x28, 0x5a, 0x37, + 0x02, 0x0c, 0x30, 0xaf, 0xa7,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 0xda, 0xde, 0x1f, 0x39, 0xe4, 0x60, 0xe4, 0x90, 0xdf, 0x23, 0x87, 0x7c, 0x1e, 0x3b, 0x95, + 0x83, 0xb1, 0x53, 0xf9, 0x31, 0x76, 0x2a, 0xaf, 0x57, 0x02, 0x61, 0xfa, 0x83, 0x6e, 0xd3, 0x43, + 0xe9, 0x16, 0x01, 0x0a, 0xcc, 0x5b, 0x8c, 0xb7, 0xdd, 0x69, 0x79, 0xd9, 0x6f, 0xa0, 0x3b, 0x97, + 0x9d, 0xda, 0x2b, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, 0x64, 0x57, 0x75, 0x23, 0x06, 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 + { + size := m.InvestorsPreseedPercentOfTotalSupply.Size() + i -= size + if _, err := m.InvestorsPreseedPercentOfTotalSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + { + size := m.MaximumMonthlyPercentageYield.Size() + i -= size + if _, err := m.MaximumMonthlyPercentageYield.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.TeamPercentOfTotalSupply.Size() + i -= size + if _, err := m.TeamPercentOfTotalSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.InvestorsPercentOfTotalSupply.Size() + i -= size + if _, err := m.InvestorsPercentOfTotalSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.ParticipantsPercentOfTotalSupply.Size() + i -= size + if _, err := m.ParticipantsPercentOfTotalSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.FoundationTreasuryPercentOfTotalSupply.Size() + i -= size + if _, err := m.FoundationTreasuryPercentOfTotalSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.EcosystemTreasuryPercentOfTotalSupply.Size() + i -= size + if _, err := m.EcosystemTreasuryPercentOfTotalSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.OneMonthSmoothingDegree.Size() + i -= size + if _, err := m.OneMonthSmoothingDegree.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.FEmission.Size() + i -= size + if _, err := m.FEmission.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.MaxSupply.Size() + i -= size + if _, err := m.MaxSupply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.MintDenom) > 0 { + i -= len(m.MintDenom) + copy(dAtA[i:], m.MintDenom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.MintDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MintDenom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.MaxSupply.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.FEmission.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.OneMonthSmoothingDegree.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.EcosystemTreasuryPercentOfTotalSupply.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.FoundationTreasuryPercentOfTotalSupply.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.ParticipantsPercentOfTotalSupply.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.InvestorsPercentOfTotalSupply.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.TeamPercentOfTotalSupply.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.MaximumMonthlyPercentageYield.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.InvestorsPreseedPercentOfTotalSupply.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MintDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MintDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FEmission", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FEmission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OneMonthSmoothingDegree", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OneMonthSmoothingDegree.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EcosystemTreasuryPercentOfTotalSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EcosystemTreasuryPercentOfTotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FoundationTreasuryPercentOfTotalSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FoundationTreasuryPercentOfTotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParticipantsPercentOfTotalSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ParticipantsPercentOfTotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvestorsPercentOfTotalSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InvestorsPercentOfTotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TeamPercentOfTotalSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TeamPercentOfTotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaximumMonthlyPercentageYield", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaximumMonthlyPercentageYield.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InvestorsPreseedPercentOfTotalSupply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InvestorsPreseedPercentOfTotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/mint/module/abci.go b/x/mint/module/abci.go index dc3957e15..63494d29f 100644 --- a/x/mint/module/abci.go +++ b/x/mint/module/abci.go @@ -19,6 +19,10 @@ func BeginBlocker(ctx context.Context, k keeper.Keeper) error { if err != nil { return err } + // if emissions are not enabled, do nothing + if !moduleParams.EmissionEnabled { + return nil + } // Get the balance of the "ecosystem" module account ecosystemBalance, err := k.GetEcosystemBalance(ctx, moduleParams.MintDenom) if err != nil { diff --git a/x/mint/module/module.go b/x/mint/module/module.go index 6fee08d2c..205d889c5 100644 --- a/x/mint/module/module.go +++ b/x/mint/module/module.go @@ -11,6 +11,7 @@ import ( modulev1 "github.com/allora-network/allora-chain/x/mint/api/mint/module/v1" v1beta1 "github.com/allora-network/allora-chain/x/mint/api/mint/v1beta1" "github.com/allora-network/allora-chain/x/mint/keeper" + migrationsV5 "github.com/allora-network/allora-chain/x/mint/migrations/v5" "github.com/allora-network/allora-chain/x/mint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -22,7 +23,7 @@ import ( ) // ConsensusVersion defines the current x/mint module consensus version. -const ConsensusVersion = 4 +const ConsensusVersion = 5 var ( _ module.AppModuleBasic = AppModule{} //nolint:exhaustruct @@ -134,6 +135,13 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err != nil { panic(fmt.Sprintf("failed to migrate x/%s from version 3 to 4: %v", types.ModuleName, err)) } + err = cfg.RegisterMigration(types.ModuleName, 4, func(ctx sdk.Context) error { + ctx.Logger().Info(fmt.Sprintf("MIGRATING %s MODULE FROM VERSION 4 TO VERSION 5", types.ModuleName)) + return migrationsV5.MigrateStore(ctx, am.keeper) + }) + if err != nil { + panic(fmt.Sprintf("failed to migrate x/%s from version 4 to 5: %v", types.ModuleName, err)) + } } // InitGenesis performs genesis initialization for the mint module. It returns diff --git a/x/mint/module/module_test.go b/x/mint/module/module_test.go index a1b251f8f..07b87c2c7 100644 --- a/x/mint/module/module_test.go +++ b/x/mint/module/module_test.go @@ -566,3 +566,31 @@ func (s *MintModuleTestSuite) TestInflationRateAsMorePeopleStakeGoesUp() { ecosystemTokensMintedDelta1.String(), ) } + +func (s *MintModuleTestSuite) TestEmissionDisabled() { + s.ctx = s.ctx.WithBlockHeight(1) + + params, err := s.mintKeeper.GetParams(s.ctx) + s.Require().NoError(err) + params.EmissionEnabled = false + err = s.mintKeeper.Params.Set(s.ctx, params) + s.Require().NoError(err) + + tokenSupplyBefore := s.bankKeeper.GetSupply(s.ctx, sdk.DefaultBondDenom) + // call begin blocker to simulate running the mint module + err = mint.BeginBlocker(s.ctx, s.mintKeeper) + s.Require().NoError(err) + + tokenSupplyAfter := s.bankKeeper.GetSupply(s.ctx, sdk.DefaultBondDenom) + s.Require().True(tokenSupplyAfter.Equal(tokenSupplyBefore), + "Token supply should stay the same when emission is disabled: %s != %s", + tokenSupplyAfter.String(), + tokenSupplyBefore.String(), + ) + ecosystemTokensMintedAfter, err := s.mintKeeper.EcosystemTokensMinted.Get(s.ctx) + s.Require().NoError(err) + s.Require().True(ecosystemTokensMintedAfter.Equal(cosmosMath.ZeroInt()), + "Ecosystem tokens minted should be zero when emission is disabled: %s != 0", + ecosystemTokensMintedAfter.String(), + ) +} diff --git a/x/mint/proto/mint/v5/genesis.proto b/x/mint/proto/mint/v5/genesis.proto new file mode 100644 index 000000000..d55b1600c --- /dev/null +++ b/x/mint/proto/mint/v5/genesis.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package mint.v5; + +import "amino/amino.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "mint/v5/types.proto"; + +option go_package = "github.com/allora-network/allora-chain/x/mint/types"; + +// GenesisState defines the mint module's genesis state. +message GenesisState { + // params defines all the parameters of the module. + Params params = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + + // previous target emission rewards per unit staked token + string previous_reward_emission_per_unit_staked_token = 2 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + + string previous_block_emission = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + + // number of tokens minted into the ecosystem treasury + string ecosystem_tokens_minted = 4 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + + // number of months already unlocked for investor token vesting purposes + string months_unlocked = 5 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} diff --git a/x/mint/proto/mint/v5/types.proto b/x/mint/proto/mint/v5/types.proto new file mode 100644 index 000000000..244a389da --- /dev/null +++ b/x/mint/proto/mint/v5/types.proto @@ -0,0 +1,97 @@ +syntax = "proto3"; +package mint.v5; + +import "amino/amino.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/allora-network/allora-chain/x/mint/types"; + +// Params defines the parameters for the x/mint module. +message Params { + option (amino.name) = "allora-chain/x/mint/Params"; + + // type of coin to mint + string mint_denom = 1; + + // maximum total supply of the coin + string max_supply = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // ecosystem treasury fraction ideally emitted per unit time + string f_emission = 3 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // one month exponential moving average smoothing factor, alpha_e in the paper + string one_month_smoothing_degree = 4 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // percentage of the total supply is reserved and locked in the ecosystem + // treasury + string ecosystem_treasury_percent_of_total_supply = 5 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // percentage of the total supply that is unlocked and usable in the + // foundation treasury + string foundation_treasury_percent_of_total_supply = 6 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // percentage of the total supply that is unlocked and usable by partipicants + // at the genesis + string participants_percent_of_total_supply = 7 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // percentage of the total supply that is locked in the investors bucket at + // the genesis + string investors_percent_of_total_supply = 8 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // percentage of the total supply that is locked in the team bucket at the + // genesis + string team_percent_of_total_supply = 9 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // The capped max monthly percentage yield (like %APY) + string maximum_monthly_percentage_yield = 10 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + // percentage of the total supply that is locked in the preseed investors + // bucket at the genesis + string investors_preseed_percent_of_total_supply = 11 [ + (cosmos_proto.scalar) = "cosmos.LegacyDec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; + + // Whether or not the network is allowed to emit any rewards + // Must be set to true to allow the network to pay out rewards. + bool emission_enabled = 12; +} diff --git a/x/mint/types/genesis.pb.go b/x/mint/types/genesis.pb.go index e78b476e1..5880d7ad7 100644 --- a/x/mint/types/genesis.pb.go +++ b/x/mint/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mint/v4/genesis.proto +// source: mint/v5/genesis.proto package types @@ -43,7 +43,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_6806f2c09310bb5c, []int{0} + return fileDescriptor_568ee8ff077da61f, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,41 +80,41 @@ func (m *GenesisState) GetParams() Params { } func init() { - proto.RegisterType((*GenesisState)(nil), "mint.v4.GenesisState") + proto.RegisterType((*GenesisState)(nil), "mint.v5.GenesisState") } -func init() { proto.RegisterFile("mint/v4/genesis.proto", fileDescriptor_6806f2c09310bb5c) } +func init() { proto.RegisterFile("mint/v5/genesis.proto", fileDescriptor_568ee8ff077da61f) } -var fileDescriptor_6806f2c09310bb5c = []byte{ - // 448 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x3f, 0x6b, 0x14, 0x41, - 0x18, 0xc6, 0x6f, 0x35, 0x46, 0xb2, 0x8a, 0x7f, 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, 0xa3, 0xaf, 0x8b, 0xb4, 0x73, 0xb9, 0x48, 0x3b, 0xbf, 0x16, 0x69, 0xe7, 0xf3, - 0x5e, 0x29, 0xa9, 0x9a, 0x8c, 0xb2, 0x1c, 0x15, 0x13, 0xe3, 0x31, 0x1a, 0x31, 0xd0, 0x40, 0x67, - 0x68, 0xea, 0x65, 0x99, 0x57, 0x42, 0x6a, 0xf6, 0x85, 0xb9, 0xb3, 0x73, 0xe7, 0x36, 0x5a, 0x77, - 0xf7, 0xb6, 0xf7, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x44, 0xd8, 0x77, 0xec, 0xef, 0x02, 0x00, 0x00, +var fileDescriptor_568ee8ff077da61f = []byte{ + // 440 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x6b, 0xd4, 0x40, + 0x14, 0xc7, 0x37, 0x5a, 0x2b, 0x8d, 0x62, 0x35, 0xba, 0x18, 0x2b, 0xa4, 0xc5, 0xd3, 0x22, 0x6c, + 0x22, 0x2d, 0xbd, 0x79, 0x5a, 0x14, 0x29, 0x58, 0x28, 0xad, 0x3d, 0xe8, 0x65, 0x98, 0x4d, 0x1e, + 0xc9, 0x90, 0x9d, 0x79, 0x61, 0xe6, 0xed, 0xd6, 0xfd, 0x16, 0xe2, 0x07, 0xf0, 0xec, 0xd1, 0x43, + 0x3f, 0x44, 0x8f, 0xa5, 0x27, 0xf1, 0x50, 0x64, 0xf7, 0xe0, 0xd7, 0x90, 0xcc, 0x4c, 0xf6, 0xd2, + 0x5b, 0x2f, 0x21, 0xef, 0xcd, 0xf0, 0xff, 0xfd, 0xde, 0xf0, 0xc2, 0xbe, 0x14, 0x8a, 0xb2, 0xd9, + 0x7e, 0x56, 0x82, 0x02, 0x23, 0x4c, 0xda, 0x68, 0x24, 0x8c, 0xee, 0xb7, 0xed, 0x74, 0xb6, 0xbf, + 0xf5, 0x84, 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 0xb5, 0x22, 0x6f, 0xbc, 0x48, 0xff, 0xa6, 0xc8, 0x81, + 0xa2, 0xab, 0xf3, 0x61, 0xe8, 0x15, 0x0e, 0x14, 0x39, 0x78, 0xbf, 0x0b, 0x1c, 0xb5, 0x79, 0x1d, + 0xbb, 0x25, 0x41, 0x8e, 0x66, 0x6e, 0x08, 0xa4, 0x1b, 0xd5, 0xb0, 0xf6, 0x01, 0xa1, 0x88, 0xd7, + 0x6e, 0x4b, 0x5a, 0x05, 0xda, 0x61, 0xcc, 0xa1, 0x8d, 0x8b, 0x3e, 0x87, 0x9b, 0x12, 0x15, 0x55, + 0x86, 0x4d, 0x55, 0xab, 0x00, 0x45, 0x7c, 0xef, 0x96, 0x84, 0x47, 0x2e, 0xe8, 0xd4, 0xe7, 0x8c, + 0x0e, 0x2f, 0x16, 0x49, 0x70, 0xb9, 0x48, 0x82, 0xbf, 0x8b, 0x24, 0xf8, 0xb6, 0x4c, 0x7a, 0x97, + 0xcb, 0xa4, 0xf7, 0x7b, 0x99, 0xf4, 0xbe, 0xec, 0x95, 0x82, 0xaa, 0xe9, 0x38, 0xcd, 0x51, 0x66, + 0x7c, 0x32, 0x41, 0xcd, 0x87, 0x0a, 0xe8, 0x0c, 0x75, 0xdd, 0x95, 0x79, 0xc5, 0x85, 0xca, 0xbe, + 0x66, 0x76, 0xd9, 0xec, 0xa6, 0x8d, 0xd7, 0xed, 0xaa, 0xed, 0xfd, 0x0f, 0x00, 0x00, 0xff, 0xff, + 0x6b, 0xb1, 0x6a, 0x16, 0xe5, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/mint/types/params.go b/x/mint/types/params.go index 21f64e020..c20271efe 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -48,6 +48,7 @@ func DefaultParams() Params { return Params{ MintDenom: sdk.DefaultBondDenom, MaxSupply: maxSupply, // 1 billion allo * 1e18 (exponent) = 1e27 uallo + EmissionEnabled: true, // We are allowed to pay out rewards and do emissions FEmission: math.LegacyMustNewDecFromStr("0.025"), // 0.025 per month OneMonthSmoothingDegree: math.LegacyMustNewDecFromStr("0.1"), // 0.1 at 1 month cadence EcosystemTreasuryPercentOfTotalSupply: math.LegacyMustNewDecFromStr("0.3595"), // 35.95% @@ -83,6 +84,11 @@ func (p Params) Validate() error { if err := validateMaxSupply(p.MaxSupply); err != nil { return err } + // no validiation for boolean EmissionEnabled since + // it can only ever either be true or false and both are valid + // if err := validateABoolean(p.EmissionEnabled); err != nil { + // return err + // } if err := validateAFractionValue(p.FEmission); err != nil { return err } diff --git a/x/mint/types/types.pb.go b/x/mint/types/types.pb.go index 8dc27f54c..f20a9fc4a 100644 --- a/x/mint/types/types.pb.go +++ b/x/mint/types/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mint/v1beta1/types.proto +// source: mint/v5/types.proto package types @@ -56,13 +56,16 @@ type Params struct { // percentage of the total supply that is locked in the preseed investors // bucket at the genesis InvestorsPreseedPercentOfTotalSupply cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=investors_preseed_percent_of_total_supply,json=investorsPreseedPercentOfTotalSupply,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"investors_preseed_percent_of_total_supply"` + // Whether or not the network is allowed to emit any rewards + // Must be set to true to allow the network to pay out rewards. + EmissionEnabled bool `protobuf:"varint,12,opt,name=emission_enabled,json=emissionEnabled,proto3" json:"emission_enabled,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_010015e812760429, []int{0} + return fileDescriptor_94f11f4531909708, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -98,51 +101,59 @@ func (m *Params) GetMintDenom() string { return "" } +func (m *Params) GetEmissionEnabled() bool { + if m != nil { + return m.EmissionEnabled + } + return false +} + func init() { - proto.RegisterType((*Params)(nil), "mint.v1beta1.Params") + proto.RegisterType((*Params)(nil), "mint.v5.Params") } -func init() { proto.RegisterFile("mint/v1beta1/types.proto", fileDescriptor_010015e812760429) } +func init() { proto.RegisterFile("mint/v5/types.proto", fileDescriptor_94f11f4531909708) } -var fileDescriptor_010015e812760429 = []byte{ - // 577 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x73, 0xfc, 0x28, 0xe4, 0x60, 0x00, 0x0b, 0x84, 0x09, 0xd4, 0x2d, 0xa8, 0x20, 0x08, - 0x4a, 0x4c, 0xd5, 0x0d, 0x31, 0x55, 0x61, 0xa8, 0x44, 0xd4, 0xa8, 0xed, 0x02, 0x0c, 0xa7, 0x8b, - 0xfd, 0xe2, 0x9c, 0xea, 0xbb, 0x67, 0xf9, 0x2e, 0x25, 0x96, 0x58, 0x61, 0x40, 0x0c, 0x2c, 0x08, - 0xf1, 0x1f, 0x30, 0x76, 0xe8, 0x1f, 0xd1, 0xb1, 0xea, 0x84, 0x90, 0xa8, 0x50, 0x32, 0xf4, 0xdf, - 0x40, 0xfe, 0xd1, 0xb4, 0x12, 0x09, 0x2c, 0x5e, 0x2c, 0xdf, 0x7b, 0xd6, 0xf7, 0xf3, 0xd1, 0x3b, - 0xfb, 0x4c, 0x6d, 0x29, 0x94, 0x71, 0x77, 0x96, 0xbb, 0x60, 0xf8, 0xb2, 0x6b, 0x92, 0x08, 0x74, - 0x33, 0x8a, 0xd1, 0xa0, 0x75, 0x35, 0xed, 0x34, 0x8b, 0x4e, 0xed, 0x3a, 0x97, 0x42, 0xa1, 0x9b, - 0x5d, 0xf3, 0x07, 0x6a, 0xb7, 0x3d, 0xd4, 0x12, 0x35, 0xcb, 0x56, 0x6e, 0xbe, 0x28, 0x5a, 0x37, - 0x02, 0x0c, 0x30, 0xa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1, - 0xba, 0xda, 0xde, 0x1f, 0x39, 0xe4, 0x60, 0xe4, 0x90, 0xdf, 0x23, 0x87, 0x7c, 0x1e, 0x3b, 0x95, - 0x83, 0xb1, 0x53, 0xf9, 0x31, 0x76, 0x2a, 0xaf, 0x57, 0x02, 0x61, 0xfa, 0x83, 0x6e, 0xd3, 0x43, - 0xe9, 0x16, 0x01, 0x0a, 0xcc, 0x5b, 0x8c, 0xb7, 0xdd, 0x69, 0x79, 0xd9, 0x6f, 0xa0, 0x3b, 0x97, - 0x9d, 0xda, 0x2b, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, 0x64, 0x57, 0x75, 0x23, 0x06, 0x00, - 0x00, +var fileDescriptor_94f11f4531909708 = []byte{ + // 599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xc7, 0x3b, 0xbf, 0x9f, 0x02, 0x1d, 0x4c, 0xc4, 0x55, 0xe3, 0x5a, 0x65, 0xa9, 0x06, 0x0d, + 0x60, 0xe8, 0x9a, 0x10, 0x2e, 0xc6, 0x13, 0x81, 0x03, 0x89, 0x04, 0x02, 0x5c, 0xd4, 0xc3, 0x64, + 0xd8, 0x7d, 0xba, 0x9d, 0xb0, 0x33, 0xcf, 0x66, 0x67, 0x8a, 0xdd, 0xc4, 0xab, 0xc6, 0x18, 0x0f, + 0x5e, 0x8c, 0xf1, 0x1d, 0x78, 0xe4, 0xc0, 0x8b, 0xe0, 0x48, 0x38, 0x19, 0x0f, 0xc4, 0xb4, 0x07, + 0xde, 0x86, 0xd9, 0x3f, 0x2d, 0x24, 0xb6, 0x7a, 0xd9, 0x4b, 0xd3, 0xfd, 0x4e, 0xf2, 0xfd, 0x7c, + 0xf2, 0x4c, 0xfb, 0x2c, 0xbd, 0x29, 0x85, 0x32, 0xee, 0xc1, 0xb2, 0x6b, 0x92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 0xe0, 0x8f, 0x9c, 0xc9, 0x64, + 0x09, 0x42, 0xb3, 0x17, 0xd7, 0x92, 0xd3, 0x86, 0xce, 0x67, 0x9e, 0x4e, 0xf5, 0x37, 0x18, 0x03, + 0xc5, 0xf7, 0x42, 0xf0, 0xed, 0x6b, 0x75, 0x32, 0x37, 0xb1, 0x7d, 0xbd, 0x9f, 0xaf, 0xe5, 0xf1, + 0xb3, 0x99, 0x8f, 0xe7, 0x87, 0x0b, 0x35, 0x1e, 0x86, 0x18, 0xf3, 0x45, 0xaf, 0xc5, 0x85, 0x72, + 0x3b, 0x6e, 0xb6, 0xdf, 0xf3, 0xfd, 0xbb, 0xb2, 0x71, 0xdc, 0x75, 0xc8, 0x49, 0xd7, 0x21, 0xbf, + 0xba, 0x0e, 0xf9, 0xdc, 0x73, 0x2a, 0x27, 0x3d, 0xa7, 0xf2, 0xa3, 0xe7, 0x54, 0x5e, 0x2d, 0x05, + 0xc2, 0xb4, 0xda, 0x7b, 0x0d, 0x0f, 0xa5, 0x5b, 0x14, 0x28, 0x30, 0x6f, 0x30, 0xde, 0x77, 0x87, + 0xf5, 0x65, 0x2f, 0x8b, 0xbd, 0xb1, 0x6c, 0xc1, 0x2f, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x89, + 0x39, 0xb8, 0xf3, 0x44, 0x06, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -165,6 +176,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.EmissionEnabled { + i-- + if m.EmissionEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } { size := m.InvestorsPreseedPercentOfTotalSupply.Size() i -= size @@ -316,6 +337,9 @@ func (m *Params) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) l = m.InvestorsPreseedPercentOfTotalSupply.Size() n += 1 + l + sovTypes(uint64(l)) + if m.EmissionEnabled { + n += 2 + } return n } @@ -726,6 +750,26 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmissionEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EmissionEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:])