cosmos-sdk/x/mint/types/mint.pb.go

782 lines
20 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/mint/v1beta1/mint.proto
package types
import (
fmt "fmt"
feat: Introduce Cosmos Scalars (#9933) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #9694 goes hand-in-hand with https://github.com/cosmos/cosmos-proto/pull/17 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
2021-09-21 02:46:29 -07:00
_ "github.com/cosmos/cosmos-proto"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/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
// Minter represents the minting state.
type Minter struct {
// current annual inflation rate
Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"`
// current annual expected provisions
AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"annual_provisions" yaml:"annual_provisions"`
}
func (m *Minter) Reset() { *m = Minter{} }
func (m *Minter) String() string { return proto.CompactTextString(m) }
func (*Minter) ProtoMessage() {}
func (*Minter) Descriptor() ([]byte, []int) {
return fileDescriptor_2df116d183c1e223, []int{0}
}
func (m *Minter) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Minter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Minter.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 *Minter) XXX_Merge(src proto.Message) {
xxx_messageInfo_Minter.Merge(m, src)
}
func (m *Minter) XXX_Size() int {
return m.Size()
}
func (m *Minter) XXX_DiscardUnknown() {
xxx_messageInfo_Minter.DiscardUnknown(m)
}
var xxx_messageInfo_Minter proto.InternalMessageInfo
// Params holds parameters for the 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 annual change in inflation rate
InflationRateChange github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=inflation_rate_change,json=inflationRateChange,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_rate_change" yaml:"inflation_rate_change"`
// maximum inflation rate
InflationMax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=inflation_max,json=inflationMax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_max" yaml:"inflation_max"`
// minimum inflation rate
InflationMin github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=inflation_min,json=inflationMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_min" yaml:"inflation_min"`
// goal of percent bonded atoms
GoalBonded github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=goal_bonded,json=goalBonded,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"goal_bonded" yaml:"goal_bonded"`
// expected blocks per year
BlocksPerYear uint64 `protobuf:"varint,6,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty" yaml:"blocks_per_year"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_2df116d183c1e223, []int{1}
}
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 (m *Params) GetBlocksPerYear() uint64 {
if m != nil {
return m.BlocksPerYear
}
return 0
}
func init() {
proto.RegisterType((*Minter)(nil), "cosmos.mint.v1beta1.Minter")
proto.RegisterType((*Params)(nil), "cosmos.mint.v1beta1.Params")
}
func init() { proto.RegisterFile("cosmos/mint/v1beta1/mint.proto", fileDescriptor_2df116d183c1e223) }
var fileDescriptor_2df116d183c1e223 = []byte{
feat: Introduce Cosmos Scalars (#9933) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #9694 goes hand-in-hand with https://github.com/cosmos/cosmos-proto/pull/17 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
2021-09-21 02:46:29 -07:00
// 460 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xc1, 0x6a, 0x13, 0x41,
0x1c, 0xc6, 0x77, 0x34, 0x06, 0x32, 0x5a, 0xd4, 0x69, 0x95, 0x35, 0xe8, 0x6e, 0xc9, 0x41, 0xea,
0xa1, 0x09, 0xc5, 0x5b, 0xf1, 0xb4, 0xcd, 0xb5, 0x10, 0x16, 0x0f, 0x5a, 0x84, 0xe5, 0xbf, 0x9b,
0x71, 0x3b, 0x74, 0x67, 0x26, 0xcc, 0x4c, 0x4b, 0xf2, 0x00, 0xde, 0x7b, 0xf4, 0xe8, 0x43, 0xf8,
0x10, 0x3d, 0x16, 0x4f, 0xe2, 0x21, 0x48, 0x72, 0x15, 0x84, 0x3e, 0x81, 0xec, 0xcc, 0x92, 0xc8,
0x2a, 0x81, 0x85, 0x9e, 0x92, 0xf9, 0x7f, 0xdf, 0xff, 0xfb, 0x7e, 0xb3, 0x30, 0x38, 0xc8, 0xa4,
0xe6, 0x52, 0x0f, 0x38, 0x13, 0x66, 0x70, 0x71, 0x90, 0x52, 0x03, 0x07, 0xf6, 0xd0, 0x9f, 0x28,
0x69, 0x24, 0xd9, 0x76, 0x7a, 0xdf, 0x8e, 0x2a, 0xbd, 0xbb, 0x93, 0xcb, 0x5c, 0x5a, 0x7d, 0x50,
0xfe, 0x73, 0xd6, 0xee, 0x33, 0x67, 0x4d, 0x9c, 0x50, 0xed, 0xd9, 0x43, 0xef, 0x17, 0xc2, 0xed,
0x63, 0x26, 0x0c, 0x55, 0xe4, 0x04, 0x77, 0x98, 0xf8, 0x58, 0x80, 0x61, 0x52, 0xf8, 0x68, 0x17,
0xed, 0x75, 0xa2, 0x37, 0x57, 0xf3, 0xd0, 0xfb, 0x31, 0x0f, 0x5f, 0xe6, 0xcc, 0x9c, 0x9e, 0xa7,
0xfd, 0x4c, 0xf2, 0x6a, 0xbd, 0xfa, 0xd9, 0xd7, 0xe3, 0xb3, 0x81, 0x99, 0x4d, 0xa8, 0xee, 0x0f,
0x69, 0xf6, 0xed, 0xeb, 0x3e, 0xae, 0xd2, 0x87, 0x34, 0x8b, 0xd7, 0x71, 0xe4, 0x13, 0xc2, 0x8f,
0x41, 0x88, 0x73, 0x28, 0x4a, 0x88, 0x0b, 0xa6, 0x99, 0x14, 0xda, 0xbf, 0x63, 0x4b, 0xde, 0x35,
0x2b, 0xb9, 0x99, 0x87, 0xfe, 0x0c, 0x78, 0x71, 0xd8, 0xfb, 0x27, 0xb0, 0x57, 0x03, 0x78, 0xe4,
0x1c, 0xa3, 0xb5, 0xe1, 0x77, 0x0b, 0xb7, 0x47, 0xa0, 0x80, 0x6b, 0xf2, 0x02, 0xe3, 0xf2, 0xd3,
0x25, 0x63, 0x2a, 0x24, 0x77, 0xf7, 0x8d, 0x3b, 0xe5, 0x64, 0x58, 0x0e, 0xc8, 0x25, 0xc2, 0x4f,
0x56, 0xfc, 0x89, 0x02, 0x43, 0x93, 0xec, 0x14, 0x44, 0x4e, 0x2b, 0xea, 0x0f, 0x8d, 0xa9, 0x9f,
0x3b, 0xea, 0xff, 0x86, 0xd6, 0xc9, 0xb7, 0x57, 0xae, 0x18, 0x0c, 0x3d, 0xb2, 0x1e, 0x32, 0xc3,
0x5b, 0xeb, 0x65, 0x0e, 0x53, 0xff, 0xae, 0x25, 0x79, 0xdb, 0x98, 0x64, 0xa7, 0x4e, 0xc2, 0x61,
0x5a, 0x27, 0x78, 0xb0, 0x52, 0x8f, 0x61, 0x5a, 0xab, 0x66, 0xc2, 0x6f, 0xdd, 0x5a, 0x35, 0x13,
0x1b, 0xaa, 0x99, 0x20, 0x1a, 0xdf, 0xcf, 0x25, 0x14, 0x49, 0x2a, 0xc5, 0x98, 0x8e, 0xfd, 0x7b,
0xb6, 0x38, 0x6e, 0x5c, 0x4c, 0x5c, 0xf1, 0x5f, 0x51, 0xf5, 0x5a, 0x5c, 0x6a, 0x91, 0x95, 0x48,
0x84, 0x1f, 0xa6, 0x85, 0xcc, 0xce, 0x74, 0x32, 0xa1, 0x2a, 0x99, 0x51, 0x50, 0x7e, 0x7b, 0x17,
0xed, 0xb5, 0xa2, 0xee, 0xcd, 0x3c, 0x7c, 0xea, 0xa2, 0x6a, 0x86, 0x5e, 0xbc, 0xe5, 0x26, 0x23,
0xaa, 0xde, 0x53, 0x50, 0x87, 0xad, 0xcf, 0x5f, 0x42, 0x2f, 0x3a, 0xba, 0x5a, 0x04, 0xe8, 0x7a,
0x11, 0xa0, 0x9f, 0x8b, 0x00, 0x5d, 0x2e, 0x03, 0xef, 0x7a, 0x19, 0x78, 0xdf, 0x97, 0x81, 0x77,
0xf2, 0x6a, 0x23, 0xfb, 0xd4, 0x3d, 0x7c, 0x7b, 0x85, 0xb4, 0x6d, 0x1f, 0xeb, 0xeb, 0x3f, 0x01,
0x00, 0x00, 0xff, 0xff, 0x6f, 0x26, 0xbe, 0x24, 0x14, 0x04, 0x00, 0x00,
}
func (m *Minter) 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 *Minter) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Minter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size := m.AnnualProvisions.Size()
i -= size
if _, err := m.AnnualProvisions.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintMint(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
{
size := m.Inflation.Size()
i -= size
if _, err := m.Inflation.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintMint(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *Params) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.BlocksPerYear != 0 {
i = encodeVarintMint(dAtA, i, uint64(m.BlocksPerYear))
i--
dAtA[i] = 0x30
}
{
size := m.GoalBonded.Size()
i -= size
if _, err := m.GoalBonded.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintMint(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
{
size := m.InflationMin.Size()
i -= size
if _, err := m.InflationMin.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintMint(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
{
size := m.InflationMax.Size()
i -= size
if _, err := m.InflationMax.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintMint(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
{
size := m.InflationRateChange.Size()
i -= size
if _, err := m.InflationRateChange.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
i = encodeVarintMint(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
if len(m.MintDenom) > 0 {
i -= len(m.MintDenom)
copy(dAtA[i:], m.MintDenom)
i = encodeVarintMint(dAtA, i, uint64(len(m.MintDenom)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintMint(dAtA []byte, offset int, v uint64) int {
offset -= sovMint(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Minter) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.Inflation.Size()
n += 1 + l + sovMint(uint64(l))
l = m.AnnualProvisions.Size()
n += 1 + l + sovMint(uint64(l))
return n
}
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 + sovMint(uint64(l))
}
l = m.InflationRateChange.Size()
n += 1 + l + sovMint(uint64(l))
l = m.InflationMax.Size()
n += 1 + l + sovMint(uint64(l))
l = m.InflationMin.Size()
n += 1 + l + sovMint(uint64(l))
l = m.GoalBonded.Size()
n += 1 + l + sovMint(uint64(l))
if m.BlocksPerYear != 0 {
n += 1 + sovMint(uint64(m.BlocksPerYear))
}
return n
}
func sovMint(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozMint(x uint64) (n int) {
return sovMint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Minter) 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 ErrIntOverflowMint
}
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: Minter: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Minter: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Inflation", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMint
}
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 ErrInvalidLengthMint
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMint
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Inflation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AnnualProvisions", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMint
}
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 ErrInvalidLengthMint
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMint
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.AnnualProvisions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMint(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthMint
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
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 ErrIntOverflowMint
}
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 ErrIntOverflowMint
}
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 ErrInvalidLengthMint
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMint
}
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 InflationRateChange", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMint
}
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 ErrInvalidLengthMint
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMint
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.InflationRateChange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field InflationMax", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMint
}
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 ErrInvalidLengthMint
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMint
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.InflationMax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field InflationMin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMint
}
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 ErrInvalidLengthMint
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMint
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.InflationMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GoalBonded", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMint
}
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 ErrInvalidLengthMint
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMint
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.GoalBonded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field BlocksPerYear", wireType)
}
m.BlocksPerYear = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMint
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.BlocksPerYear |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipMint(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthMint
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipMint(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, ErrIntOverflowMint
}
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, ErrIntOverflowMint
}
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, ErrIntOverflowMint
}
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, ErrInvalidLengthMint
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupMint
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthMint
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthMint = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMint = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupMint = fmt.Errorf("proto: unexpected end of group")
)