// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: emissions/v3/stake.proto

package types

import (
	cosmossdk_io_math "cosmossdk.io/math"
	fmt "fmt"
	github_com_allora_network_allora_chain_math "github.com/allora-network/allora-chain/math"
	_ "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

// Bad naming convention, only used in StakeRemovals
// DEPRECATED in ConsensusVersion = 2
// TO BE DELETED in ConsensusVersion = 3
type StakePlacement struct {
	BlockRemovalStarted int64                 `protobuf:"varint,1,opt,name=block_removal_started,json=blockRemovalStarted,proto3" json:"block_removal_started,omitempty"`
	TopicId             uint64                `protobuf:"varint,2,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"`
	Reputer             string                `protobuf:"bytes,3,opt,name=reputer,proto3" json:"reputer,omitempty"`
	Amount              cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
}

func (m *StakePlacement) Reset()         { *m = StakePlacement{} }
func (m *StakePlacement) String() string { return proto.CompactTextString(m) }
func (*StakePlacement) ProtoMessage()    {}
func (*StakePlacement) Descriptor() ([]byte, []int) {
	return fileDescriptor_cdee6632fec3e740, []int{0}
}
func (m *StakePlacement) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *StakePlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_StakePlacement.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 *StakePlacement) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StakePlacement.Merge(m, src)
}
func (m *StakePlacement) XXX_Size() int {
	return m.Size()
}
func (m *StakePlacement) XXX_DiscardUnknown() {
	xxx_messageInfo_StakePlacement.DiscardUnknown(m)
}

var xxx_messageInfo_StakePlacement proto.InternalMessageInfo

func (m *StakePlacement) GetBlockRemovalStarted() int64 {
	if m != nil {
		return m.BlockRemovalStarted
	}
	return 0
}

func (m *StakePlacement) GetTopicId() uint64 {
	if m != nil {
		return m.TopicId
	}
	return 0
}

func (m *StakePlacement) GetReputer() string {
	if m != nil {
		return m.Reputer
	}
	return ""
}

// Bad naming convention, only used in StakeRemovals
// DEPRECATED in ConsensusVersion = 2
// TO BE DELETED in ConsensusVersion = 3
type DelegateStakePlacement struct {
	BlockRemovalStarted int64                 `protobuf:"varint,1,opt,name=block_removal_started,json=blockRemovalStarted,proto3" json:"block_removal_started,omitempty"`
	TopicId             uint64                `protobuf:"varint,2,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"`
	Reputer             string                `protobuf:"bytes,3,opt,name=reputer,proto3" json:"reputer,omitempty"`
	Delegator           string                `protobuf:"bytes,4,opt,name=delegator,proto3" json:"delegator,omitempty"`
	Amount              cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
}

func (m *DelegateStakePlacement) Reset()         { *m = DelegateStakePlacement{} }
func (m *DelegateStakePlacement) String() string { return proto.CompactTextString(m) }
func (*DelegateStakePlacement) ProtoMessage()    {}
func (*DelegateStakePlacement) Descriptor() ([]byte, []int) {
	return fileDescriptor_cdee6632fec3e740, []int{1}
}
func (m *DelegateStakePlacement) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DelegateStakePlacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DelegateStakePlacement.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 *DelegateStakePlacement) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DelegateStakePlacement.Merge(m, src)
}
func (m *DelegateStakePlacement) XXX_Size() int {
	return m.Size()
}
func (m *DelegateStakePlacement) XXX_DiscardUnknown() {
	xxx_messageInfo_DelegateStakePlacement.DiscardUnknown(m)
}

var xxx_messageInfo_DelegateStakePlacement proto.InternalMessageInfo

func (m *DelegateStakePlacement) GetBlockRemovalStarted() int64 {
	if m != nil {
		return m.BlockRemovalStarted
	}
	return 0
}

func (m *DelegateStakePlacement) GetTopicId() uint64 {
	if m != nil {
		return m.TopicId
	}
	return 0
}

func (m *DelegateStakePlacement) GetReputer() string {
	if m != nil {
		return m.Reputer
	}
	return ""
}

func (m *DelegateStakePlacement) GetDelegator() string {
	if m != nil {
		return m.Delegator
	}
	return ""
}

// Introduced in ConsensusVersion = 2
type StakeInfo struct {
	TopicId uint64                `protobuf:"varint,1,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"`
	Reputer string                `protobuf:"bytes,2,opt,name=reputer,proto3" json:"reputer,omitempty"`
	Amount  cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
}

func (m *StakeInfo) Reset()         { *m = StakeInfo{} }
func (m *StakeInfo) String() string { return proto.CompactTextString(m) }
func (*StakeInfo) ProtoMessage()    {}
func (*StakeInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_cdee6632fec3e740, []int{2}
}
func (m *StakeInfo) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *StakeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_StakeInfo.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 *StakeInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StakeInfo.Merge(m, src)
}
func (m *StakeInfo) XXX_Size() int {
	return m.Size()
}
func (m *StakeInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_StakeInfo.DiscardUnknown(m)
}

var xxx_messageInfo_StakeInfo proto.InternalMessageInfo

func (m *StakeInfo) GetTopicId() uint64 {
	if m != nil {
		return m.TopicId
	}
	return 0
}

func (m *StakeInfo) GetReputer() string {
	if m != nil {
		return m.Reputer
	}
	return ""
}

// Introduced in ConsensusVersion = 2
type StakeRemovalInfo struct {
	BlockRemovalStarted   int64                 `protobuf:"varint,1,opt,name=block_removal_started,json=blockRemovalStarted,proto3" json:"block_removal_started,omitempty"`
	TopicId               uint64                `protobuf:"varint,2,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"`
	Reputer               string                `protobuf:"bytes,3,opt,name=reputer,proto3" json:"reputer,omitempty"`
	Amount                cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
	BlockRemovalCompleted int64                 `protobuf:"varint,5,opt,name=block_removal_completed,json=blockRemovalCompleted,proto3" json:"block_removal_completed,omitempty"`
}

func (m *StakeRemovalInfo) Reset()         { *m = StakeRemovalInfo{} }
func (m *StakeRemovalInfo) String() string { return proto.CompactTextString(m) }
func (*StakeRemovalInfo) ProtoMessage()    {}
func (*StakeRemovalInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_cdee6632fec3e740, []int{3}
}
func (m *StakeRemovalInfo) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *StakeRemovalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_StakeRemovalInfo.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 *StakeRemovalInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_StakeRemovalInfo.Merge(m, src)
}
func (m *StakeRemovalInfo) XXX_Size() int {
	return m.Size()
}
func (m *StakeRemovalInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_StakeRemovalInfo.DiscardUnknown(m)
}

var xxx_messageInfo_StakeRemovalInfo proto.InternalMessageInfo

func (m *StakeRemovalInfo) GetBlockRemovalStarted() int64 {
	if m != nil {
		return m.BlockRemovalStarted
	}
	return 0
}

func (m *StakeRemovalInfo) GetTopicId() uint64 {
	if m != nil {
		return m.TopicId
	}
	return 0
}

func (m *StakeRemovalInfo) GetReputer() string {
	if m != nil {
		return m.Reputer
	}
	return ""
}

func (m *StakeRemovalInfo) GetBlockRemovalCompleted() int64 {
	if m != nil {
		return m.BlockRemovalCompleted
	}
	return 0
}

// Introduced in ConsensusVersion = 2
type DelegateStakeRemovalInfo struct {
	BlockRemovalStarted   int64                 `protobuf:"varint,1,opt,name=block_removal_started,json=blockRemovalStarted,proto3" json:"block_removal_started,omitempty"`
	TopicId               uint64                `protobuf:"varint,2,opt,name=topic_id,json=topicId,proto3" json:"topic_id,omitempty"`
	Reputer               string                `protobuf:"bytes,3,opt,name=reputer,proto3" json:"reputer,omitempty"`
	Delegator             string                `protobuf:"bytes,4,opt,name=delegator,proto3" json:"delegator,omitempty"`
	Amount                cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
	BlockRemovalCompleted int64                 `protobuf:"varint,6,opt,name=block_removal_completed,json=blockRemovalCompleted,proto3" json:"block_removal_completed,omitempty"`
}

func (m *DelegateStakeRemovalInfo) Reset()         { *m = DelegateStakeRemovalInfo{} }
func (m *DelegateStakeRemovalInfo) String() string { return proto.CompactTextString(m) }
func (*DelegateStakeRemovalInfo) ProtoMessage()    {}
func (*DelegateStakeRemovalInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_cdee6632fec3e740, []int{4}
}
func (m *DelegateStakeRemovalInfo) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DelegateStakeRemovalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DelegateStakeRemovalInfo.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 *DelegateStakeRemovalInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DelegateStakeRemovalInfo.Merge(m, src)
}
func (m *DelegateStakeRemovalInfo) XXX_Size() int {
	return m.Size()
}
func (m *DelegateStakeRemovalInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_DelegateStakeRemovalInfo.DiscardUnknown(m)
}

var xxx_messageInfo_DelegateStakeRemovalInfo proto.InternalMessageInfo

func (m *DelegateStakeRemovalInfo) GetBlockRemovalStarted() int64 {
	if m != nil {
		return m.BlockRemovalStarted
	}
	return 0
}

func (m *DelegateStakeRemovalInfo) GetTopicId() uint64 {
	if m != nil {
		return m.TopicId
	}
	return 0
}

func (m *DelegateStakeRemovalInfo) GetReputer() string {
	if m != nil {
		return m.Reputer
	}
	return ""
}

func (m *DelegateStakeRemovalInfo) GetDelegator() string {
	if m != nil {
		return m.Delegator
	}
	return ""
}

func (m *DelegateStakeRemovalInfo) GetBlockRemovalCompleted() int64 {
	if m != nil {
		return m.BlockRemovalCompleted
	}
	return 0
}

type DelegatorInfo struct {
	Amount     github_com_allora_network_allora_chain_math.Dec `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/allora-network/allora-chain/math.Dec" json:"amount"`
	RewardDebt github_com_allora_network_allora_chain_math.Dec `protobuf:"bytes,2,opt,name=reward_debt,json=rewardDebt,proto3,customtype=github.com/allora-network/allora-chain/math.Dec" json:"reward_debt"`
}

func (m *DelegatorInfo) Reset()         { *m = DelegatorInfo{} }
func (m *DelegatorInfo) String() string { return proto.CompactTextString(m) }
func (*DelegatorInfo) ProtoMessage()    {}
func (*DelegatorInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_cdee6632fec3e740, []int{5}
}
func (m *DelegatorInfo) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DelegatorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DelegatorInfo.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 *DelegatorInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DelegatorInfo.Merge(m, src)
}
func (m *DelegatorInfo) XXX_Size() int {
	return m.Size()
}
func (m *DelegatorInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_DelegatorInfo.DiscardUnknown(m)
}

var xxx_messageInfo_DelegatorInfo proto.InternalMessageInfo

func init() {
	proto.RegisterType((*StakePlacement)(nil), "emissions.v3.StakePlacement")
	proto.RegisterType((*DelegateStakePlacement)(nil), "emissions.v3.DelegateStakePlacement")
	proto.RegisterType((*StakeInfo)(nil), "emissions.v3.StakeInfo")
	proto.RegisterType((*StakeRemovalInfo)(nil), "emissions.v3.StakeRemovalInfo")
	proto.RegisterType((*DelegateStakeRemovalInfo)(nil), "emissions.v3.DelegateStakeRemovalInfo")
	proto.RegisterType((*DelegatorInfo)(nil), "emissions.v3.DelegatorInfo")
}

func init() { proto.RegisterFile("emissions/v3/stake.proto", fileDescriptor_cdee6632fec3e740) }

var fileDescriptor_cdee6632fec3e740 = []byte{
	// 495 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0xb1, 0x6f, 0xd3, 0x4e,
	0x14, 0xc7, 0x73, 0x49, 0x9b, 0xfe, 0x72, 0x3f, 0x40, 0x60, 0x08, 0xb8, 0x15, 0x72, 0xa3, 0x4c,
	0x11, 0x52, 0x6d, 0x44, 0x24, 0x60, 0x2e, 0x19, 0xc8, 0x04, 0x72, 0x17, 0xc4, 0x62, 0x9d, 0xed,
	0x47, 0x62, 0xc5, 0x77, 0xcf, 0xba, 0xbb, 0xa4, 0xf0, 0x2f, 0x30, 0xf1, 0x3f, 0xb0, 0x30, 0x32,
	0x30, 0xb1, 0xb2, 0x74, 0xac, 0x98, 0x10, 0x43, 0x85, 0x92, 0x01, 0xf1, 0x47, 0x20, 0xa1, 0xdc,
	0x39, 0x69, 0x33, 0xb4, 0x42, 0x54, 0xa2, 0x62, 0xb1, 0xfc, 0xde, 0xd7, 0x7e, 0xf7, 0xf9, 0x7e,
	0xf5, 0x74, 0xd4, 0x05, 0x9e, 0x29, 0x95, 0xa1, 0x50, 0xc1, 0xa4, 0x1b, 0x28, 0xcd, 0x46, 0xe0,
	0x17, 0x12, 0x35, 0x3a, 0x97, 0x96, 0x8a, 0x3f, 0xe9, 0x6e, 0x5d, 0x63, 0x3c, 0x13, 0x18, 0x98,
	0xa7, 0xfd, 0x60, 0x6b, 0x33, 0x41, 0xc5, 0x51, 0x45, 0xa6, 0x0a, 0x6c, 0x51, 0x4a, 0x37, 0x06,
	0x38, 0x40, 0xdb, 0x9f, 0xbf, 0xd9, 0x6e, 0xfb, 0x13, 0xa1, 0x57, 0xf6, 0xe6, 0x27, 0x3c, 0xcd,
	0x59, 0x02, 0x1c, 0x84, 0x76, 0xee, 0xd1, 0x66, 0x9c, 0x63, 0x32, 0x8a, 0x24, 0x70, 0x9c, 0xb0,
	0x3c, 0x52, 0x9a, 0x49, 0x0d, 0xa9, 0x4b, 0x5a, 0xa4, 0x53, 0x0b, 0xaf, 0x1b, 0x31, 0xb4, 0xda,
	0x9e, 0x95, 0x9c, 0x4d, 0xfa, 0x9f, 0xc6, 0x22, 0x4b, 0xa2, 0x2c, 0x75, 0xab, 0x2d, 0xd2, 0x59,
	0x0b, 0x37, 0x4c, 0xdd, 0x4f, 0x1d, 0x97, 0x6e, 0x48, 0x28, 0xc6, 0x1a, 0xa4, 0x5b, 0x6b, 0x91,
	0x4e, 0x23, 0x5c, 0x94, 0xce, 0x63, 0x5a, 0x67, 0x1c, 0xc7, 0x42, 0xbb, 0x6b, 0x73, 0x61, 0xf7,
	0xee, 0xc1, 0xd1, 0x76, 0xe5, 0xeb, 0xd1, 0x76, 0xd3, 0x72, 0xab, 0x74, 0xe4, 0x67, 0x18, 0x70,
	0xa6, 0x87, 0x7e, 0x5f, 0xe8, 0xcf, 0x1f, 0x76, 0x68, 0x69, 0xa8, 0x2f, 0xf4, 0xbb, 0xef, 0xef,
	0xef, 0x90, 0xb0, 0xfc, 0xbf, 0xfd, 0x83, 0xd0, 0x9b, 0x3d, 0xc8, 0x61, 0xc0, 0x34, 0x5c, 0x94,
	0x9b, 0xdb, 0xb4, 0x91, 0x5a, 0x04, 0x94, 0xd6, 0x50, 0x78, 0xdc, 0x38, 0xe1, 0x75, 0xfd, 0x9c,
	0x5e, 0x5f, 0x13, 0xda, 0x30, 0x1e, 0xfb, 0xe2, 0x05, 0xae, 0xa0, 0x92, 0x53, 0x51, 0xab, 0xa7,
	0x05, 0x5f, 0x3b, 0x27, 0xcc, 0x4f, 0x42, 0xaf, 0x1a, 0x98, 0x32, 0x41, 0xc3, 0xf4, 0xef, 0x2d,
	0x90, 0x73, 0x9f, 0xde, 0x5a, 0x45, 0x4e, 0x90, 0x17, 0x39, 0xcc, 0xa1, 0xd7, 0x0d, 0x74, 0xf3,
	0x24, 0xf4, 0xa3, 0x85, 0xd8, 0x7e, 0x5b, 0xa5, 0xee, 0xca, 0xe2, 0x5d, 0x48, 0x0e, 0x7f, 0x69,
	0xf5, 0xce, 0x4a, 0xa9, 0x7e, 0x56, 0x4a, 0x1f, 0x09, 0xbd, 0xdc, 0x5b, 0xf0, 0x98, 0x68, 0x9e,
	0x2c, 0x99, 0x88, 0x61, 0x7a, 0x50, 0x32, 0x05, 0x83, 0x4c, 0x0f, 0xc7, 0xb1, 0x9f, 0x20, 0x0f,
	0x58, 0x9e, 0xa3, 0x64, 0x3b, 0x02, 0xf4, 0x3e, 0xca, 0xd1, 0xa2, 0x4c, 0x86, 0x2c, 0x13, 0x96,
	0xb6, 0x07, 0xc9, 0x12, 0xed, 0x19, 0xfd, 0x5f, 0xc2, 0x3e, 0x93, 0x69, 0x94, 0x42, 0xac, 0xed,
	0xc2, 0xff, 0xf9, 0x54, 0x6a, 0x67, 0xf5, 0x20, 0xd6, 0xbb, 0xe1, 0xc1, 0xd4, 0x23, 0x87, 0x53,
	0x8f, 0x7c, 0x9b, 0x7a, 0xe4, 0xcd, 0xcc, 0xab, 0x1c, 0xce, 0xbc, 0xca, 0x97, 0x99, 0x57, 0x79,
	0xfe, 0xf0, 0x37, 0xc7, 0xbe, 0x0c, 0x8e, 0x2f, 0x74, 0xfd, 0xaa, 0x00, 0x15, 0xd7, 0xcd, 0xe5,
	0xdb, 0xfd, 0x15, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x21, 0xcd, 0x79, 0xea, 0x05, 0x00, 0x00,
}

func (m *StakePlacement) 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 *StakePlacement) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *StakePlacement) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size := m.Amount.Size()
		i -= size
		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintStake(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x22
	if len(m.Reputer) > 0 {
		i -= len(m.Reputer)
		copy(dAtA[i:], m.Reputer)
		i = encodeVarintStake(dAtA, i, uint64(len(m.Reputer)))
		i--
		dAtA[i] = 0x1a
	}
	if m.TopicId != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.TopicId))
		i--
		dAtA[i] = 0x10
	}
	if m.BlockRemovalStarted != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.BlockRemovalStarted))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *DelegateStakePlacement) 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 *DelegateStakePlacement) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *DelegateStakePlacement) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size := m.Amount.Size()
		i -= size
		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintStake(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x2a
	if len(m.Delegator) > 0 {
		i -= len(m.Delegator)
		copy(dAtA[i:], m.Delegator)
		i = encodeVarintStake(dAtA, i, uint64(len(m.Delegator)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Reputer) > 0 {
		i -= len(m.Reputer)
		copy(dAtA[i:], m.Reputer)
		i = encodeVarintStake(dAtA, i, uint64(len(m.Reputer)))
		i--
		dAtA[i] = 0x1a
	}
	if m.TopicId != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.TopicId))
		i--
		dAtA[i] = 0x10
	}
	if m.BlockRemovalStarted != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.BlockRemovalStarted))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *StakeInfo) 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 *StakeInfo) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *StakeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size := m.Amount.Size()
		i -= size
		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintStake(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.Reputer) > 0 {
		i -= len(m.Reputer)
		copy(dAtA[i:], m.Reputer)
		i = encodeVarintStake(dAtA, i, uint64(len(m.Reputer)))
		i--
		dAtA[i] = 0x12
	}
	if m.TopicId != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.TopicId))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *StakeRemovalInfo) 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 *StakeRemovalInfo) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *StakeRemovalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.BlockRemovalCompleted != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.BlockRemovalCompleted))
		i--
		dAtA[i] = 0x28
	}
	{
		size := m.Amount.Size()
		i -= size
		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintStake(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x22
	if len(m.Reputer) > 0 {
		i -= len(m.Reputer)
		copy(dAtA[i:], m.Reputer)
		i = encodeVarintStake(dAtA, i, uint64(len(m.Reputer)))
		i--
		dAtA[i] = 0x1a
	}
	if m.TopicId != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.TopicId))
		i--
		dAtA[i] = 0x10
	}
	if m.BlockRemovalStarted != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.BlockRemovalStarted))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *DelegateStakeRemovalInfo) 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 *DelegateStakeRemovalInfo) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *DelegateStakeRemovalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.BlockRemovalCompleted != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.BlockRemovalCompleted))
		i--
		dAtA[i] = 0x30
	}
	{
		size := m.Amount.Size()
		i -= size
		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintStake(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x2a
	if len(m.Delegator) > 0 {
		i -= len(m.Delegator)
		copy(dAtA[i:], m.Delegator)
		i = encodeVarintStake(dAtA, i, uint64(len(m.Delegator)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Reputer) > 0 {
		i -= len(m.Reputer)
		copy(dAtA[i:], m.Reputer)
		i = encodeVarintStake(dAtA, i, uint64(len(m.Reputer)))
		i--
		dAtA[i] = 0x1a
	}
	if m.TopicId != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.TopicId))
		i--
		dAtA[i] = 0x10
	}
	if m.BlockRemovalStarted != 0 {
		i = encodeVarintStake(dAtA, i, uint64(m.BlockRemovalStarted))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *DelegatorInfo) 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 *DelegatorInfo) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *DelegatorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size := m.RewardDebt.Size()
		i -= size
		if _, err := m.RewardDebt.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintStake(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	{
		size := m.Amount.Size()
		i -= size
		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintStake(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

func encodeVarintStake(dAtA []byte, offset int, v uint64) int {
	offset -= sovStake(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *StakePlacement) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.BlockRemovalStarted != 0 {
		n += 1 + sovStake(uint64(m.BlockRemovalStarted))
	}
	if m.TopicId != 0 {
		n += 1 + sovStake(uint64(m.TopicId))
	}
	l = len(m.Reputer)
	if l > 0 {
		n += 1 + l + sovStake(uint64(l))
	}
	l = m.Amount.Size()
	n += 1 + l + sovStake(uint64(l))
	return n
}

func (m *DelegateStakePlacement) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.BlockRemovalStarted != 0 {
		n += 1 + sovStake(uint64(m.BlockRemovalStarted))
	}
	if m.TopicId != 0 {
		n += 1 + sovStake(uint64(m.TopicId))
	}
	l = len(m.Reputer)
	if l > 0 {
		n += 1 + l + sovStake(uint64(l))
	}
	l = len(m.Delegator)
	if l > 0 {
		n += 1 + l + sovStake(uint64(l))
	}
	l = m.Amount.Size()
	n += 1 + l + sovStake(uint64(l))
	return n
}

func (m *StakeInfo) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.TopicId != 0 {
		n += 1 + sovStake(uint64(m.TopicId))
	}
	l = len(m.Reputer)
	if l > 0 {
		n += 1 + l + sovStake(uint64(l))
	}
	l = m.Amount.Size()
	n += 1 + l + sovStake(uint64(l))
	return n
}

func (m *StakeRemovalInfo) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.BlockRemovalStarted != 0 {
		n += 1 + sovStake(uint64(m.BlockRemovalStarted))
	}
	if m.TopicId != 0 {
		n += 1 + sovStake(uint64(m.TopicId))
	}
	l = len(m.Reputer)
	if l > 0 {
		n += 1 + l + sovStake(uint64(l))
	}
	l = m.Amount.Size()
	n += 1 + l + sovStake(uint64(l))
	if m.BlockRemovalCompleted != 0 {
		n += 1 + sovStake(uint64(m.BlockRemovalCompleted))
	}
	return n
}

func (m *DelegateStakeRemovalInfo) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.BlockRemovalStarted != 0 {
		n += 1 + sovStake(uint64(m.BlockRemovalStarted))
	}
	if m.TopicId != 0 {
		n += 1 + sovStake(uint64(m.TopicId))
	}
	l = len(m.Reputer)
	if l > 0 {
		n += 1 + l + sovStake(uint64(l))
	}
	l = len(m.Delegator)
	if l > 0 {
		n += 1 + l + sovStake(uint64(l))
	}
	l = m.Amount.Size()
	n += 1 + l + sovStake(uint64(l))
	if m.BlockRemovalCompleted != 0 {
		n += 1 + sovStake(uint64(m.BlockRemovalCompleted))
	}
	return n
}

func (m *DelegatorInfo) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Amount.Size()
	n += 1 + l + sovStake(uint64(l))
	l = m.RewardDebt.Size()
	n += 1 + l + sovStake(uint64(l))
	return n
}

func sovStake(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozStake(x uint64) (n int) {
	return sovStake(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *StakePlacement) 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 ErrIntOverflowStake
			}
			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: StakePlacement: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: StakePlacement: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRemovalStarted", wireType)
			}
			m.BlockRemovalStarted = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockRemovalStarted |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TopicId", wireType)
			}
			m.TopicId = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TopicId |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Reputer", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Reputer = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipStake(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthStake
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *DelegateStakePlacement) 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 ErrIntOverflowStake
			}
			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: DelegateStakePlacement: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: DelegateStakePlacement: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRemovalStarted", wireType)
			}
			m.BlockRemovalStarted = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockRemovalStarted |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TopicId", wireType)
			}
			m.TopicId = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TopicId |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Reputer", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Reputer = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Delegator", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Delegator = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipStake(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthStake
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *StakeInfo) 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 ErrIntOverflowStake
			}
			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: StakeInfo: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: StakeInfo: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TopicId", wireType)
			}
			m.TopicId = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TopicId |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Reputer", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Reputer = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipStake(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthStake
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *StakeRemovalInfo) 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 ErrIntOverflowStake
			}
			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: StakeRemovalInfo: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: StakeRemovalInfo: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRemovalStarted", wireType)
			}
			m.BlockRemovalStarted = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockRemovalStarted |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TopicId", wireType)
			}
			m.TopicId = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TopicId |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Reputer", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Reputer = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRemovalCompleted", wireType)
			}
			m.BlockRemovalCompleted = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockRemovalCompleted |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipStake(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthStake
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *DelegateStakeRemovalInfo) 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 ErrIntOverflowStake
			}
			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: DelegateStakeRemovalInfo: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: DelegateStakeRemovalInfo: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRemovalStarted", wireType)
			}
			m.BlockRemovalStarted = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockRemovalStarted |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TopicId", wireType)
			}
			m.TopicId = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TopicId |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Reputer", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Reputer = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Delegator", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Delegator = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockRemovalCompleted", wireType)
			}
			m.BlockRemovalCompleted = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockRemovalCompleted |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipStake(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthStake
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *DelegatorInfo) 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 ErrIntOverflowStake
			}
			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: DelegatorInfo: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: DelegatorInfo: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RewardDebt", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowStake
				}
				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 ErrInvalidLengthStake
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthStake
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.RewardDebt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipStake(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthStake
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipStake(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, ErrIntOverflowStake
			}
			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, ErrIntOverflowStake
				}
				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, ErrIntOverflowStake
				}
				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, ErrInvalidLengthStake
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupStake
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthStake
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthStake        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStake          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStake = fmt.Errorf("proto: unexpected end of group")
)
