// DONTCOVER
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: archway/rewards/v1/tx.proto

package types

import (
	context "context"
	fmt "fmt"
	types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/cosmos-sdk/types/msgservice"
	_ "github.com/cosmos/gogoproto/gogoproto"
	grpc1 "github.com/cosmos/gogoproto/grpc"
	proto "github.com/cosmos/gogoproto/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// MsgSetContractMetadata is the request for Msg.SetContractMetadata.
type MsgSetContractMetadata struct {
	// sender_address is the msg sender address (bech32 encoded).
	SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"`
	// metadata is the contract metadata to set / update.
	// If metadata exists, non-empty fields will be updated.
	Metadata ContractMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata"`
}

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

var xxx_messageInfo_MsgSetContractMetadata proto.InternalMessageInfo

func (m *MsgSetContractMetadata) GetSenderAddress() string {
	if m != nil {
		return m.SenderAddress
	}
	return ""
}

func (m *MsgSetContractMetadata) GetMetadata() ContractMetadata {
	if m != nil {
		return m.Metadata
	}
	return ContractMetadata{}
}

// MsgSetContractMetadataResponse is the response for Msg.SetContractMetadata.
type MsgSetContractMetadataResponse struct {
}

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

var xxx_messageInfo_MsgSetContractMetadataResponse proto.InternalMessageInfo

// MsgWithdrawRewards is the request for Msg.WithdrawRewards.
type MsgWithdrawRewards struct {
	// rewards_address is the address to distribute rewards to (bech32 encoded).
	RewardsAddress string `protobuf:"bytes,1,opt,name=rewards_address,json=rewardsAddress,proto3" json:"rewards_address,omitempty"`
	// mode defines the operation type.
	//
	// Types that are valid to be assigned to Mode:
	//	*MsgWithdrawRewards_RecordsLimit_
	//	*MsgWithdrawRewards_RecordIds
	Mode isMsgWithdrawRewards_Mode `protobuf_oneof:"mode"`
}

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

var xxx_messageInfo_MsgWithdrawRewards proto.InternalMessageInfo

type isMsgWithdrawRewards_Mode interface {
	isMsgWithdrawRewards_Mode()
	MarshalTo([]byte) (int, error)
	Size() int
}

type MsgWithdrawRewards_RecordsLimit_ struct {
	RecordsLimit *MsgWithdrawRewards_RecordsLimit `protobuf:"bytes,2,opt,name=records_limit,json=recordsLimit,proto3,oneof" json:"records_limit,omitempty"`
}
type MsgWithdrawRewards_RecordIds struct {
	RecordIds *MsgWithdrawRewards_RecordIDs `protobuf:"bytes,3,opt,name=record_ids,json=recordIds,proto3,oneof" json:"record_ids,omitempty"`
}

func (*MsgWithdrawRewards_RecordsLimit_) isMsgWithdrawRewards_Mode() {}
func (*MsgWithdrawRewards_RecordIds) isMsgWithdrawRewards_Mode()     {}

func (m *MsgWithdrawRewards) GetMode() isMsgWithdrawRewards_Mode {
	if m != nil {
		return m.Mode
	}
	return nil
}

func (m *MsgWithdrawRewards) GetRewardsAddress() string {
	if m != nil {
		return m.RewardsAddress
	}
	return ""
}

func (m *MsgWithdrawRewards) GetRecordsLimit() *MsgWithdrawRewards_RecordsLimit {
	if x, ok := m.GetMode().(*MsgWithdrawRewards_RecordsLimit_); ok {
		return x.RecordsLimit
	}
	return nil
}

func (m *MsgWithdrawRewards) GetRecordIds() *MsgWithdrawRewards_RecordIDs {
	if x, ok := m.GetMode().(*MsgWithdrawRewards_RecordIds); ok {
		return x.RecordIds
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*MsgWithdrawRewards) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*MsgWithdrawRewards_RecordsLimit_)(nil),
		(*MsgWithdrawRewards_RecordIds)(nil),
	}
}

type MsgWithdrawRewards_RecordsLimit struct {
	Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
}

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

var xxx_messageInfo_MsgWithdrawRewards_RecordsLimit proto.InternalMessageInfo

func (m *MsgWithdrawRewards_RecordsLimit) GetLimit() uint64 {
	if m != nil {
		return m.Limit
	}
	return 0
}

type MsgWithdrawRewards_RecordIDs struct {
	Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}

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

var xxx_messageInfo_MsgWithdrawRewards_RecordIDs proto.InternalMessageInfo

func (m *MsgWithdrawRewards_RecordIDs) GetIds() []uint64 {
	if m != nil {
		return m.Ids
	}
	return nil
}

// MsgWithdrawRewardsResponse is the response for Msg.WithdrawRewards.
type MsgWithdrawRewardsResponse struct {
	// records_num is the number of RewardsRecord objects processed.
	RecordsNum uint64 `protobuf:"varint,1,opt,name=records_num,json=recordsNum,proto3" json:"records_num,omitempty"`
	// rewards are the total rewards transferred.
	TotalRewards []types.Coin `protobuf:"bytes,2,rep,name=total_rewards,json=totalRewards,proto3" json:"total_rewards"`
}

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

var xxx_messageInfo_MsgWithdrawRewardsResponse proto.InternalMessageInfo

func (m *MsgWithdrawRewardsResponse) GetRecordsNum() uint64 {
	if m != nil {
		return m.RecordsNum
	}
	return 0
}

func (m *MsgWithdrawRewardsResponse) GetTotalRewards() []types.Coin {
	if m != nil {
		return m.TotalRewards
	}
	return nil
}

// MsgSetFlatFee is the request for Msg.SetFlatFee.
type MsgSetFlatFee struct {
	// sender_address is the msg sender address (bech32 encoded).
	SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"`
	// contract_address is the contract address (bech32 encoded).
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// flat_fee_amount defines the minimum flat fee set by the contract_owner
	FlatFeeAmount types.Coin `protobuf:"bytes,3,opt,name=flat_fee_amount,json=flatFeeAmount,proto3" json:"flat_fee_amount"`
}

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

var xxx_messageInfo_MsgSetFlatFee proto.InternalMessageInfo

func (m *MsgSetFlatFee) GetSenderAddress() string {
	if m != nil {
		return m.SenderAddress
	}
	return ""
}

func (m *MsgSetFlatFee) GetContractAddress() string {
	if m != nil {
		return m.ContractAddress
	}
	return ""
}

func (m *MsgSetFlatFee) GetFlatFeeAmount() types.Coin {
	if m != nil {
		return m.FlatFeeAmount
	}
	return types.Coin{}
}

// MsgSetFlatFeeResponse is the response for Msg.SetFlatFee.
type MsgSetFlatFeeResponse struct {
}

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

var xxx_messageInfo_MsgSetFlatFeeResponse proto.InternalMessageInfo

// MsgUpdateParams is the Msg/UpdateParams request type.
//
// Since: archway v5 && cosmos-sdk 0.47
type MsgUpdateParams struct {
	// authority is the address that controls the module (defaults to x/gov unless overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// params defines the x/rewards parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
}

func (m *MsgUpdateParams) Reset()         { *m = MsgUpdateParams{} }
func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParams) ProtoMessage()    {}
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
	return fileDescriptor_d5741d3c1465c0f5, []int{6}
}
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *MsgUpdateParams) XXX_Merge(src proto.Message) {
	xxx_messageInfo_MsgUpdateParams.Merge(m, src)
}
func (m *MsgUpdateParams) XXX_Size() int {
	return m.Size()
}
func (m *MsgUpdateParams) XXX_DiscardUnknown() {
	xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m)
}

var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo

func (m *MsgUpdateParams) GetAuthority() string {
	if m != nil {
		return m.Authority
	}
	return ""
}

func (m *MsgUpdateParams) GetParams() Params {
	if m != nil {
		return m.Params
	}
	return Params{}
}

// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: archway v5 && cosmos-sdk 0.47
type MsgUpdateParamsResponse struct {
}

func (m *MsgUpdateParamsResponse) Reset()         { *m = MsgUpdateParamsResponse{} }
func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParamsResponse) ProtoMessage()    {}
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_d5741d3c1465c0f5, []int{7}
}
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src)
}
func (m *MsgUpdateParamsResponse) XXX_Size() int {
	return m.Size()
}
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m)
}

var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo

func init() {
	proto.RegisterType((*MsgSetContractMetadata)(nil), "archway.rewards.v1.MsgSetContractMetadata")
	proto.RegisterType((*MsgSetContractMetadataResponse)(nil), "archway.rewards.v1.MsgSetContractMetadataResponse")
	proto.RegisterType((*MsgWithdrawRewards)(nil), "archway.rewards.v1.MsgWithdrawRewards")
	proto.RegisterType((*MsgWithdrawRewards_RecordsLimit)(nil), "archway.rewards.v1.MsgWithdrawRewards.RecordsLimit")
	proto.RegisterType((*MsgWithdrawRewards_RecordIDs)(nil), "archway.rewards.v1.MsgWithdrawRewards.RecordIDs")
	proto.RegisterType((*MsgWithdrawRewardsResponse)(nil), "archway.rewards.v1.MsgWithdrawRewardsResponse")
	proto.RegisterType((*MsgSetFlatFee)(nil), "archway.rewards.v1.MsgSetFlatFee")
	proto.RegisterType((*MsgSetFlatFeeResponse)(nil), "archway.rewards.v1.MsgSetFlatFeeResponse")
	proto.RegisterType((*MsgUpdateParams)(nil), "archway.rewards.v1.MsgUpdateParams")
	proto.RegisterType((*MsgUpdateParamsResponse)(nil), "archway.rewards.v1.MsgUpdateParamsResponse")
}

func init() { proto.RegisterFile("archway/rewards/v1/tx.proto", fileDescriptor_d5741d3c1465c0f5) }

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

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type MsgClient interface {
	// SetContractMetadata creates or updates an existing contract metadata.
	// Method is authorized to the contract owner (admin if no metadata exists).
	SetContractMetadata(ctx context.Context, in *MsgSetContractMetadata, opts ...grpc.CallOption) (*MsgSetContractMetadataResponse, error)
	// WithdrawRewards performs collected rewards distribution.
	// Rewards might be credited from multiple contracts (rewards_address must be
	// set in the corresponding contract metadata).
	WithdrawRewards(ctx context.Context, in *MsgWithdrawRewards, opts ...grpc.CallOption) (*MsgWithdrawRewardsResponse, error)
	// SetFlatFee sets or updates or removes the flat fee to interact with the
	// contract Method is authorized to the contract owner.
	SetFlatFee(ctx context.Context, in *MsgSetFlatFee, opts ...grpc.CallOption) (*MsgSetFlatFeeResponse, error)
	// UpdateParams defines a governance operation for updating the x/rewards
	// module parameters. The authority is defined in the keeper.
	//
	// Since: archway v5 && cosmos-sdk 0.47
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}

type msgClient struct {
	cc grpc1.ClientConn
}

func NewMsgClient(cc grpc1.ClientConn) MsgClient {
	return &msgClient{cc}
}

func (c *msgClient) SetContractMetadata(ctx context.Context, in *MsgSetContractMetadata, opts ...grpc.CallOption) (*MsgSetContractMetadataResponse, error) {
	out := new(MsgSetContractMetadataResponse)
	err := c.cc.Invoke(ctx, "/archway.rewards.v1.Msg/SetContractMetadata", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *msgClient) WithdrawRewards(ctx context.Context, in *MsgWithdrawRewards, opts ...grpc.CallOption) (*MsgWithdrawRewardsResponse, error) {
	out := new(MsgWithdrawRewardsResponse)
	err := c.cc.Invoke(ctx, "/archway.rewards.v1.Msg/WithdrawRewards", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *msgClient) SetFlatFee(ctx context.Context, in *MsgSetFlatFee, opts ...grpc.CallOption) (*MsgSetFlatFeeResponse, error) {
	out := new(MsgSetFlatFeeResponse)
	err := c.cc.Invoke(ctx, "/archway.rewards.v1.Msg/SetFlatFee", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
	out := new(MsgUpdateParamsResponse)
	err := c.cc.Invoke(ctx, "/archway.rewards.v1.Msg/UpdateParams", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MsgServer is the server API for Msg service.
type MsgServer interface {
	// SetContractMetadata creates or updates an existing contract metadata.
	// Method is authorized to the contract owner (admin if no metadata exists).
	SetContractMetadata(context.Context, *MsgSetContractMetadata) (*MsgSetContractMetadataResponse, error)
	// WithdrawRewards performs collected rewards distribution.
	// Rewards might be credited from multiple contracts (rewards_address must be
	// set in the corresponding contract metadata).
	WithdrawRewards(context.Context, *MsgWithdrawRewards) (*MsgWithdrawRewardsResponse, error)
	// SetFlatFee sets or updates or removes the flat fee to interact with the
	// contract Method is authorized to the contract owner.
	SetFlatFee(context.Context, *MsgSetFlatFee) (*MsgSetFlatFeeResponse, error)
	// UpdateParams defines a governance operation for updating the x/rewards
	// module parameters. The authority is defined in the keeper.
	//
	// Since: archway v5 && cosmos-sdk 0.47
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

// UnimplementedMsgServer can be embedded to have forward compatible implementations.
type UnimplementedMsgServer struct {
}

func (*UnimplementedMsgServer) SetContractMetadata(ctx context.Context, req *MsgSetContractMetadata) (*MsgSetContractMetadataResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetContractMetadata not implemented")
}
func (*UnimplementedMsgServer) WithdrawRewards(ctx context.Context, req *MsgWithdrawRewards) (*MsgWithdrawRewardsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method WithdrawRewards not implemented")
}
func (*UnimplementedMsgServer) SetFlatFee(ctx context.Context, req *MsgSetFlatFee) (*MsgSetFlatFeeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetFlatFee not implemented")
}
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}

func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
	s.RegisterService(&_Msg_serviceDesc, srv)
}

func _Msg_SetContractMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MsgSetContractMetadata)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MsgServer).SetContractMetadata(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/archway.rewards.v1.Msg/SetContractMetadata",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MsgServer).SetContractMetadata(ctx, req.(*MsgSetContractMetadata))
	}
	return interceptor(ctx, in, info, handler)
}

func _Msg_WithdrawRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MsgWithdrawRewards)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MsgServer).WithdrawRewards(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/archway.rewards.v1.Msg/WithdrawRewards",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MsgServer).WithdrawRewards(ctx, req.(*MsgWithdrawRewards))
	}
	return interceptor(ctx, in, info, handler)
}

func _Msg_SetFlatFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MsgSetFlatFee)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MsgServer).SetFlatFee(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/archway.rewards.v1.Msg/SetFlatFee",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MsgServer).SetFlatFee(ctx, req.(*MsgSetFlatFee))
	}
	return interceptor(ctx, in, info, handler)
}

func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MsgUpdateParams)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(MsgServer).UpdateParams(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/archway.rewards.v1.Msg/UpdateParams",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
	}
	return interceptor(ctx, in, info, handler)
}

var _Msg_serviceDesc = grpc.ServiceDesc{
	ServiceName: "archway.rewards.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetContractMetadata",
			Handler:    _Msg_SetContractMetadata_Handler,
		},
		{
			MethodName: "WithdrawRewards",
			Handler:    _Msg_WithdrawRewards_Handler,
		},
		{
			MethodName: "SetFlatFee",
			Handler:    _Msg_SetFlatFee_Handler,
		},
		{
			MethodName: "UpdateParams",
			Handler:    _Msg_UpdateParams_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "archway/rewards/v1/tx.proto",
}

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

func (m *MsgSetContractMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintTx(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	if len(m.SenderAddress) > 0 {
		i -= len(m.SenderAddress)
		copy(dAtA[i:], m.SenderAddress)
		i = encodeVarintTx(dAtA, i, uint64(len(m.SenderAddress)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *MsgSetContractMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

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

func (m *MsgWithdrawRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Mode != nil {
		{
			size := m.Mode.Size()
			i -= size
			if _, err := m.Mode.MarshalTo(dAtA[i:]); err != nil {
				return 0, err
			}
		}
	}
	if len(m.RewardsAddress) > 0 {
		i -= len(m.RewardsAddress)
		copy(dAtA[i:], m.RewardsAddress)
		i = encodeVarintTx(dAtA, i, uint64(len(m.RewardsAddress)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *MsgWithdrawRewards_RecordsLimit_) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *MsgWithdrawRewards_RecordsLimit_) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.RecordsLimit != nil {
		{
			size, err := m.RecordsLimit.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintTx(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}
func (m *MsgWithdrawRewards_RecordIds) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *MsgWithdrawRewards_RecordIds) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.RecordIds != nil {
		{
			size, err := m.RecordIds.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintTx(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x1a
	}
	return len(dAtA) - i, nil
}
func (m *MsgWithdrawRewards_RecordsLimit) 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 *MsgWithdrawRewards_RecordsLimit) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *MsgWithdrawRewards_RecordsLimit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Limit != 0 {
		i = encodeVarintTx(dAtA, i, uint64(m.Limit))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *MsgWithdrawRewards_RecordIDs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Ids) > 0 {
		dAtA5 := make([]byte, len(m.Ids)*10)
		var j4 int
		for _, num := range m.Ids {
			for num >= 1<<7 {
				dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j4++
			}
			dAtA5[j4] = uint8(num)
			j4++
		}
		i -= j4
		copy(dAtA[i:], dAtA5[:j4])
		i = encodeVarintTx(dAtA, i, uint64(j4))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *MsgWithdrawRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.TotalRewards) > 0 {
		for iNdEx := len(m.TotalRewards) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.TotalRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintTx(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if m.RecordsNum != 0 {
		i = encodeVarintTx(dAtA, i, uint64(m.RecordsNum))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *MsgSetFlatFee) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.FlatFeeAmount.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintTx(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.ContractAddress) > 0 {
		i -= len(m.ContractAddress)
		copy(dAtA[i:], m.ContractAddress)
		i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.SenderAddress) > 0 {
		i -= len(m.SenderAddress)
		copy(dAtA[i:], m.SenderAddress)
		i = encodeVarintTx(dAtA, i, uint64(len(m.SenderAddress)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *MsgSetFlatFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintTx(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	if len(m.Authority) > 0 {
		i -= len(m.Authority)
		copy(dAtA[i:], m.Authority)
		i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
	offset -= sovTx(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *MsgSetContractMetadata) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.SenderAddress)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = m.Metadata.Size()
	n += 1 + l + sovTx(uint64(l))
	return n
}

func (m *MsgSetContractMetadataResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *MsgWithdrawRewards) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.RewardsAddress)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	if m.Mode != nil {
		n += m.Mode.Size()
	}
	return n
}

func (m *MsgWithdrawRewards_RecordsLimit_) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.RecordsLimit != nil {
		l = m.RecordsLimit.Size()
		n += 1 + l + sovTx(uint64(l))
	}
	return n
}
func (m *MsgWithdrawRewards_RecordIds) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.RecordIds != nil {
		l = m.RecordIds.Size()
		n += 1 + l + sovTx(uint64(l))
	}
	return n
}
func (m *MsgWithdrawRewards_RecordsLimit) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Limit != 0 {
		n += 1 + sovTx(uint64(m.Limit))
	}
	return n
}

func (m *MsgWithdrawRewards_RecordIDs) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Ids) > 0 {
		l = 0
		for _, e := range m.Ids {
			l += sovTx(uint64(e))
		}
		n += 1 + sovTx(uint64(l)) + l
	}
	return n
}

func (m *MsgWithdrawRewardsResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.RecordsNum != 0 {
		n += 1 + sovTx(uint64(m.RecordsNum))
	}
	if len(m.TotalRewards) > 0 {
		for _, e := range m.TotalRewards {
			l = e.Size()
			n += 1 + l + sovTx(uint64(l))
		}
	}
	return n
}

func (m *MsgSetFlatFee) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.SenderAddress)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = len(m.ContractAddress)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = m.FlatFeeAmount.Size()
	n += 1 + l + sovTx(uint64(l))
	return n
}

func (m *MsgSetFlatFeeResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *MsgUpdateParams) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Authority)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = m.Params.Size()
	n += 1 + l + sovTx(uint64(l))
	return n
}

func (m *MsgUpdateParamsResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func sovTx(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozTx(x uint64) (n int) {
	return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *MsgSetContractMetadata) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgSetContractMetadata: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgSetContractMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SenderAddress = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgSetContractMetadataResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgSetContractMetadataResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgSetContractMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgWithdrawRewards) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgWithdrawRewards: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgWithdrawRewards: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RewardsAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RewardsAddress = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RecordsLimit", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &MsgWithdrawRewards_RecordsLimit{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Mode = &MsgWithdrawRewards_RecordsLimit_{v}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RecordIds", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &MsgWithdrawRewards_RecordIDs{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Mode = &MsgWithdrawRewards_RecordIds{v}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgWithdrawRewards_RecordsLimit) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RecordsLimit: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RecordsLimit: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType)
			}
			m.Limit = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Limit |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgWithdrawRewards_RecordIDs) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RecordIDs: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RecordIDs: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType == 0 {
				var v uint64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowTx
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					v |= uint64(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.Ids = append(m.Ids, v)
			} else if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowTx
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					packedLen |= int(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				if packedLen < 0 {
					return ErrInvalidLengthTx
				}
				postIndex := iNdEx + packedLen
				if postIndex < 0 {
					return ErrInvalidLengthTx
				}
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				var elementCount int
				var count int
				for _, integer := range dAtA[iNdEx:postIndex] {
					if integer < 128 {
						count++
					}
				}
				elementCount = count
				if elementCount != 0 && len(m.Ids) == 0 {
					m.Ids = make([]uint64, 0, elementCount)
				}
				for iNdEx < postIndex {
					var v uint64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowTx
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						v |= uint64(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.Ids = append(m.Ids, v)
				}
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType)
			}
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgWithdrawRewardsResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgWithdrawRewardsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgWithdrawRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RecordsNum", wireType)
			}
			m.RecordsNum = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RecordsNum |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field TotalRewards", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.TotalRewards = append(m.TotalRewards, types.Coin{})
			if err := m.TotalRewards[len(m.TotalRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgSetFlatFee) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgSetFlatFee: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgSetFlatFee: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SenderAddress = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ContractAddress = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field FlatFeeAmount", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.FlatFeeAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgSetFlatFeeResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgSetFlatFeeResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgSetFlatFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Authority = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTx
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthTx
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthTx
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowTx
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipTx(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthTx
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipTx(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowTx
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowTx
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowTx
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthTx
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupTx
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthTx
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
