// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: haqq/liquidvesting/v1/tx.proto

package types

import (
	context "context"
	fmt "fmt"
	types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
	_ "github.com/cosmos/gogoproto/gogoproto"
	grpc1 "github.com/cosmos/gogoproto/grpc"
	proto "github.com/cosmos/gogoproto/proto"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	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

// MsgLiquidate represents message to liquidate arbitrary amount of tokens
// locked in vesting
type MsgLiquidate struct {
	// account for liquidation of locked vesting tokens
	LiquidateFrom string `protobuf:"bytes,1,opt,name=liquidate_from,json=liquidateFrom,proto3" json:"liquidate_from,omitempty"`
	// account to send resulted liquid token
	LiquidateTo string `protobuf:"bytes,2,opt,name=liquidate_to,json=liquidateTo,proto3" json:"liquidate_to,omitempty"`
	// amount of tokens subject for liquidation
	Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}

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

var xxx_messageInfo_MsgLiquidate proto.InternalMessageInfo

func (m *MsgLiquidate) GetLiquidateFrom() string {
	if m != nil {
		return m.LiquidateFrom
	}
	return ""
}

func (m *MsgLiquidate) GetLiquidateTo() string {
	if m != nil {
		return m.LiquidateTo
	}
	return ""
}

func (m *MsgLiquidate) GetAmount() types.Coin {
	if m != nil {
		return m.Amount
	}
	return types.Coin{}
}

// MsgLiquidateResponse defines the Msg/Liquidate response type
type MsgLiquidateResponse struct {
	// amount of liquid tokens minted
	Minted types.Coin `protobuf:"bytes,1,opt,name=minted,proto3" json:"minted"`
	// address of erc20 the liquidation denom contract
	ContractAddr string `protobuf:"bytes,2,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"`
}

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

var xxx_messageInfo_MsgLiquidateResponse proto.InternalMessageInfo

func (m *MsgLiquidateResponse) GetMinted() types.Coin {
	if m != nil {
		return m.Minted
	}
	return types.Coin{}
}

func (m *MsgLiquidateResponse) GetContractAddr() string {
	if m != nil {
		return m.ContractAddr
	}
	return ""
}

// MsgLiquidate represents message to redeem arbitrary amount of liquid vesting
// tokens
type MsgRedeem struct {
	RedeemFrom string `protobuf:"bytes,1,opt,name=redeem_from,json=redeemFrom,proto3" json:"redeem_from,omitempty"`
	// destination address for vesting tokens
	RedeemTo string `protobuf:"bytes,2,opt,name=redeem_to,json=redeemTo,proto3" json:"redeem_to,omitempty"`
	// amount of vesting tokens to redeem from liquidation module
	Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}

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

var xxx_messageInfo_MsgRedeem proto.InternalMessageInfo

func (m *MsgRedeem) GetRedeemFrom() string {
	if m != nil {
		return m.RedeemFrom
	}
	return ""
}

func (m *MsgRedeem) GetRedeemTo() string {
	if m != nil {
		return m.RedeemTo
	}
	return ""
}

func (m *MsgRedeem) GetAmount() types.Coin {
	if m != nil {
		return m.Amount
	}
	return types.Coin{}
}

// MsgRedeemResponse defines the Msg/Redeem response type
type MsgRedeemResponse struct {
}

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

var xxx_messageInfo_MsgRedeemResponse proto.InternalMessageInfo

func init() {
	proto.RegisterType((*MsgLiquidate)(nil), "haqq.liquidvesting.v1.MsgLiquidate")
	proto.RegisterType((*MsgLiquidateResponse)(nil), "haqq.liquidvesting.v1.MsgLiquidateResponse")
	proto.RegisterType((*MsgRedeem)(nil), "haqq.liquidvesting.v1.MsgRedeem")
	proto.RegisterType((*MsgRedeemResponse)(nil), "haqq.liquidvesting.v1.MsgRedeemResponse")
}

func init() { proto.RegisterFile("haqq/liquidvesting/v1/tx.proto", fileDescriptor_cfdce5e8d421730a) }

var fileDescriptor_cfdce5e8d421730a = []byte{
	// 479 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x41, 0x6b, 0x13, 0x41,
	0x14, 0xc7, 0x33, 0x29, 0x04, 0x77, 0x92, 0x0a, 0x5d, 0x2b, 0xc4, 0x28, 0xdb, 0xb8, 0xa1, 0x10,
	0x2c, 0xce, 0x90, 0x78, 0xf5, 0x62, 0x05, 0x4f, 0xcd, 0x25, 0x78, 0xf2, 0x52, 0x26, 0xbb, 0xe3,
	0x74, 0x30, 0x3b, 0x2f, 0x99, 0x99, 0xc4, 0xf6, 0xe2, 0xc1, 0x8b, 0xe0, 0x49, 0x14, 0xfc, 0x0c,
	0x1e, 0xfd, 0x18, 0x3d, 0x16, 0xbc, 0x78, 0x12, 0x49, 0x04, 0xbf, 0x86, 0x64, 0x66, 0x77, 0x1b,
	0xc5, 0x60, 0xc1, 0x4b, 0x78, 0xf9, 0xbf, 0xff, 0xbc, 0xf7, 0xe3, 0x3f, 0xb3, 0x38, 0x3a, 0x61,
	0xd3, 0x29, 0x1d, 0xcb, 0xe9, 0x4c, 0xa6, 0x73, 0x6e, 0xac, 0x54, 0x82, 0xce, 0x7b, 0xd4, 0x9e,
	0x92, 0x89, 0x06, 0x0b, 0xe1, 0xcd, 0x55, 0x9f, 0xfc, 0xd6, 0x27, 0xf3, 0x5e, 0x6b, 0x87, 0x65,
	0x52, 0x01, 0x75, 0xbf, 0xde, 0xd9, 0xda, 0x15, 0x20, 0xc0, 0x95, 0x74, 0x55, 0xe5, 0xea, 0x1d,
	0x01, 0x20, 0xc6, 0x9c, 0xb2, 0x89, 0xa4, 0x4c, 0x29, 0xb0, 0xcc, 0x4a, 0x50, 0x26, 0xef, 0x46,
	0x09, 0x98, 0x0c, 0x0c, 0x1d, 0x31, 0xc3, 0xe9, 0xbc, 0x37, 0xe2, 0x96, 0xf5, 0x68, 0x02, 0x52,
	0xf9, 0x7e, 0xfc, 0x11, 0xe1, 0xc6, 0xc0, 0x88, 0x23, 0xb7, 0x9e, 0x59, 0x1e, 0xee, 0xe3, 0xeb,
	0xe3, 0xe2, 0xcf, 0xf1, 0x73, 0x0d, 0x59, 0x13, 0xb5, 0x51, 0x37, 0x18, 0x6e, 0x97, 0xea, 0x13,
	0x0d, 0x59, 0x78, 0x17, 0x37, 0x2e, 0x6d, 0x16, 0x9a, 0x55, 0x67, 0xaa, 0x97, 0xda, 0x53, 0x08,
	0x1f, 0xe2, 0x1a, 0xcb, 0x60, 0xa6, 0x6c, 0x73, 0xab, 0x8d, 0xba, 0xf5, 0xfe, 0x2d, 0xe2, 0x59,
	0xc8, 0x8a, 0x85, 0xe4, 0x2c, 0xe4, 0x31, 0x48, 0x75, 0x18, 0x9c, 0x7f, 0xdb, 0xab, 0x7c, 0xfa,
	0xf9, 0xf9, 0x1e, 0x1a, 0xe6, 0x67, 0xe2, 0x33, 0xbc, 0xbb, 0xce, 0x35, 0xe4, 0x66, 0x02, 0xca,
	0xf0, 0xd5, 0xd4, 0x4c, 0x2a, 0xcb, 0x53, 0xc7, 0x75, 0xe5, 0xa9, 0xfe, 0x4c, 0xd8, 0xc1, 0xdb,
	0x09, 0x28, 0xab, 0x59, 0x62, 0x8f, 0x59, 0x9a, 0xea, 0x9c, 0xbb, 0x51, 0x88, 0x8f, 0xd2, 0x54,
	0xc7, 0x6f, 0x10, 0x0e, 0x06, 0x46, 0x0c, 0x79, 0xca, 0x79, 0x16, 0xee, 0xe1, 0xba, 0x76, 0xd5,
	0x7a, 0x1a, 0xd8, 0x4b, 0x2e, 0x8a, 0xdb, 0x38, 0xc8, 0x0d, 0x65, 0x0e, 0xd7, 0xbc, 0xf0, 0xdf,
	0x21, 0xdc, 0xc0, 0x3b, 0x25, 0x48, 0x91, 0x40, 0xff, 0x7d, 0x15, 0x6f, 0x0d, 0x8c, 0x08, 0xdf,
	0x22, 0x1c, 0x5c, 0xde, 0x5b, 0x87, 0xfc, 0xf5, 0x1d, 0x91, 0xf5, 0x10, 0x5b, 0x07, 0x57, 0x30,
	0x15, 0x7b, 0xe2, 0x83, 0xd7, 0x5f, 0x7e, 0x7c, 0xa8, 0xee, 0xc7, 0x1d, 0xba, 0xe9, 0x05, 0xd3,
	0xf2, 0xba, 0xc3, 0x57, 0xb8, 0x96, 0xe7, 0xd5, 0xde, 0xbc, 0xc3, 0x3b, 0x5a, 0xdd, 0x7f, 0x39,
	0x4a, 0x84, 0xae, 0x43, 0x88, 0xe3, 0xf6, 0x66, 0x04, 0x9f, 0xf4, 0xe1, 0xd1, 0xf9, 0x22, 0x42,
	0x17, 0x8b, 0x08, 0x7d, 0x5f, 0x44, 0xe8, 0xdd, 0x32, 0xaa, 0x5c, 0x2c, 0xa3, 0xca, 0xd7, 0x65,
	0x54, 0x79, 0xd6, 0x17, 0xd2, 0x9e, 0xcc, 0x46, 0x24, 0x81, 0xcc, 0x4d, 0xb9, 0xaf, 0xb8, 0x7d,
	0x09, 0xfa, 0x85, 0x1f, 0x79, 0xfa, 0xc7, 0x50, 0x7b, 0x36, 0xe1, 0x66, 0x54, 0x73, 0x1f, 0xc7,
	0x83, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x0f, 0x20, 0x6d, 0xbc, 0x03, 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 {
	// Liquidate transforms specified amount of tokens locked on vesting account
	// into a new liquid token
	Liquidate(ctx context.Context, in *MsgLiquidate, opts ...grpc.CallOption) (*MsgLiquidateResponse, error)
	// Redeem burns liquid token and deposits corresponding amount of vesting
	// token to the specified account
	Redeem(ctx context.Context, in *MsgRedeem, opts ...grpc.CallOption) (*MsgRedeemResponse, error)
}

type msgClient struct {
	cc grpc1.ClientConn
}

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

func (c *msgClient) Liquidate(ctx context.Context, in *MsgLiquidate, opts ...grpc.CallOption) (*MsgLiquidateResponse, error) {
	out := new(MsgLiquidateResponse)
	err := c.cc.Invoke(ctx, "/haqq.liquidvesting.v1.Msg/Liquidate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *msgClient) Redeem(ctx context.Context, in *MsgRedeem, opts ...grpc.CallOption) (*MsgRedeemResponse, error) {
	out := new(MsgRedeemResponse)
	err := c.cc.Invoke(ctx, "/haqq.liquidvesting.v1.Msg/Redeem", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// MsgServer is the server API for Msg service.
type MsgServer interface {
	// Liquidate transforms specified amount of tokens locked on vesting account
	// into a new liquid token
	Liquidate(context.Context, *MsgLiquidate) (*MsgLiquidateResponse, error)
	// Redeem burns liquid token and deposits corresponding amount of vesting
	// token to the specified account
	Redeem(context.Context, *MsgRedeem) (*MsgRedeemResponse, error)
}

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

func (*UnimplementedMsgServer) Liquidate(ctx context.Context, req *MsgLiquidate) (*MsgLiquidateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Liquidate not implemented")
}
func (*UnimplementedMsgServer) Redeem(ctx context.Context, req *MsgRedeem) (*MsgRedeemResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Redeem not implemented")
}

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

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

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

var _Msg_serviceDesc = grpc.ServiceDesc{
	ServiceName: "haqq.liquidvesting.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Liquidate",
			Handler:    _Msg_Liquidate_Handler,
		},
		{
			MethodName: "Redeem",
			Handler:    _Msg_Redeem_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "haqq/liquidvesting/v1/tx.proto",
}

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

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

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

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

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

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

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

func (m *MsgRedeemResponse) 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 *MsgLiquidate) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.LiquidateFrom)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = len(m.LiquidateTo)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = m.Amount.Size()
	n += 1 + l + sovTx(uint64(l))
	return n
}

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

func (m *MsgRedeem) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.RedeemFrom)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = len(m.RedeemTo)
	if l > 0 {
		n += 1 + l + sovTx(uint64(l))
	}
	l = m.Amount.Size()
	n += 1 + l + sovTx(uint64(l))
	return n
}

func (m *MsgRedeemResponse) 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 *MsgLiquidate) 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: MsgLiquidate: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgLiquidate: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LiquidateFrom", 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.LiquidateFrom = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LiquidateTo", 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.LiquidateTo = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount.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 *MsgLiquidateResponse) 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: MsgLiquidateResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgLiquidateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Minted", 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.Minted.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ContractAddr", 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.ContractAddr = string(dAtA[iNdEx:postIndex])
			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 *MsgRedeem) 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: MsgRedeem: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgRedeem: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RedeemFrom", 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.RedeemFrom = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RedeemTo", 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.RedeemTo = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount.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 *MsgRedeemResponse) 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: MsgRedeemResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MsgRedeemResponse: 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")
)
