// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: ibc/applications/interchain_accounts/genesis/v1/genesis.proto

package types

import (
	fmt "fmt"
	_ "github.com/cosmos/gogoproto/gogoproto"
	proto "github.com/cosmos/gogoproto/proto"
	types "git.cw.tr/mukan-network/mukan-ibc/modules/apps/27-interchain-accounts/controller/types"
	types1 "git.cw.tr/mukan-network/mukan-ibc/modules/apps/27-interchain-accounts/host/types"
	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

// GenesisState defines the interchain accounts genesis state
type GenesisState struct {
	ControllerGenesisState ControllerGenesisState `protobuf:"bytes,1,opt,name=controller_genesis_state,json=controllerGenesisState,proto3" json:"controller_genesis_state"`
	HostGenesisState       HostGenesisState       `protobuf:"bytes,2,opt,name=host_genesis_state,json=hostGenesisState,proto3" json:"host_genesis_state"`
}

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

var xxx_messageInfo_GenesisState proto.InternalMessageInfo

func (m *GenesisState) GetControllerGenesisState() ControllerGenesisState {
	if m != nil {
		return m.ControllerGenesisState
	}
	return ControllerGenesisState{}
}

func (m *GenesisState) GetHostGenesisState() HostGenesisState {
	if m != nil {
		return m.HostGenesisState
	}
	return HostGenesisState{}
}

// ControllerGenesisState defines the interchain accounts controller genesis state
type ControllerGenesisState struct {
	ActiveChannels     []ActiveChannel               `protobuf:"bytes,1,rep,name=active_channels,json=activeChannels,proto3" json:"active_channels"`
	InterchainAccounts []RegisteredInterchainAccount `protobuf:"bytes,2,rep,name=interchain_accounts,json=interchainAccounts,proto3" json:"interchain_accounts"`
	Ports              []string                      `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"`
	Params             types.Params                  `protobuf:"bytes,4,opt,name=params,proto3" json:"params"`
}

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

var xxx_messageInfo_ControllerGenesisState proto.InternalMessageInfo

func (m *ControllerGenesisState) GetActiveChannels() []ActiveChannel {
	if m != nil {
		return m.ActiveChannels
	}
	return nil
}

func (m *ControllerGenesisState) GetInterchainAccounts() []RegisteredInterchainAccount {
	if m != nil {
		return m.InterchainAccounts
	}
	return nil
}

func (m *ControllerGenesisState) GetPorts() []string {
	if m != nil {
		return m.Ports
	}
	return nil
}

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

// HostGenesisState defines the interchain accounts host genesis state
type HostGenesisState struct {
	ActiveChannels     []ActiveChannel               `protobuf:"bytes,1,rep,name=active_channels,json=activeChannels,proto3" json:"active_channels"`
	InterchainAccounts []RegisteredInterchainAccount `protobuf:"bytes,2,rep,name=interchain_accounts,json=interchainAccounts,proto3" json:"interchain_accounts"`
	Port               string                        `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"`
	Params             types1.Params                 `protobuf:"bytes,4,opt,name=params,proto3" json:"params"`
}

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

var xxx_messageInfo_HostGenesisState proto.InternalMessageInfo

func (m *HostGenesisState) GetActiveChannels() []ActiveChannel {
	if m != nil {
		return m.ActiveChannels
	}
	return nil
}

func (m *HostGenesisState) GetInterchainAccounts() []RegisteredInterchainAccount {
	if m != nil {
		return m.InterchainAccounts
	}
	return nil
}

func (m *HostGenesisState) GetPort() string {
	if m != nil {
		return m.Port
	}
	return ""
}

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

// ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to
// indicate if the channel is middleware enabled
type ActiveChannel struct {
	ConnectionId        string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	PortId              string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
	ChannelId           string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	IsMiddlewareEnabled bool   `protobuf:"varint,4,opt,name=is_middleware_enabled,json=isMiddlewareEnabled,proto3" json:"is_middleware_enabled,omitempty"`
}

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

var xxx_messageInfo_ActiveChannel proto.InternalMessageInfo

func (m *ActiveChannel) GetConnectionId() string {
	if m != nil {
		return m.ConnectionId
	}
	return ""
}

func (m *ActiveChannel) GetPortId() string {
	if m != nil {
		return m.PortId
	}
	return ""
}

func (m *ActiveChannel) GetChannelId() string {
	if m != nil {
		return m.ChannelId
	}
	return ""
}

func (m *ActiveChannel) GetIsMiddlewareEnabled() bool {
	if m != nil {
		return m.IsMiddlewareEnabled
	}
	return false
}

// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address
type RegisteredInterchainAccount struct {
	ConnectionId   string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	PortId         string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
	AccountAddress string `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"`
}

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

var xxx_messageInfo_RegisteredInterchainAccount proto.InternalMessageInfo

func (m *RegisteredInterchainAccount) GetConnectionId() string {
	if m != nil {
		return m.ConnectionId
	}
	return ""
}

func (m *RegisteredInterchainAccount) GetPortId() string {
	if m != nil {
		return m.PortId
	}
	return ""
}

func (m *RegisteredInterchainAccount) GetAccountAddress() string {
	if m != nil {
		return m.AccountAddress
	}
	return ""
}

func init() {
	proto.RegisterType((*GenesisState)(nil), "ibc.applications.interchain_accounts.genesis.v1.GenesisState")
	proto.RegisterType((*ControllerGenesisState)(nil), "ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState")
	proto.RegisterType((*HostGenesisState)(nil), "ibc.applications.interchain_accounts.genesis.v1.HostGenesisState")
	proto.RegisterType((*ActiveChannel)(nil), "ibc.applications.interchain_accounts.genesis.v1.ActiveChannel")
	proto.RegisterType((*RegisteredInterchainAccount)(nil), "ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount")
}

func init() {
	proto.RegisterFile("ibc/applications/interchain_accounts/genesis/v1/genesis.proto", fileDescriptor_d4aa48c8e29a1947)
}

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

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

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.HostGenesisState.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintGenesis(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	{
		size, err := m.ControllerGenesisState.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintGenesis(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *ControllerGenesisState) 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 = encodeVarintGenesis(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x22
	if len(m.Ports) > 0 {
		for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.Ports[iNdEx])
			copy(dAtA[i:], m.Ports[iNdEx])
			i = encodeVarintGenesis(dAtA, i, uint64(len(m.Ports[iNdEx])))
			i--
			dAtA[i] = 0x1a
		}
	}
	if len(m.InterchainAccounts) > 0 {
		for iNdEx := len(m.InterchainAccounts) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.InterchainAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintGenesis(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.ActiveChannels) > 0 {
		for iNdEx := len(m.ActiveChannels) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.ActiveChannels[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintGenesis(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

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

func (m *HostGenesisState) 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 = encodeVarintGenesis(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x22
	if len(m.Port) > 0 {
		i -= len(m.Port)
		copy(dAtA[i:], m.Port)
		i = encodeVarintGenesis(dAtA, i, uint64(len(m.Port)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.InterchainAccounts) > 0 {
		for iNdEx := len(m.InterchainAccounts) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.InterchainAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintGenesis(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.ActiveChannels) > 0 {
		for iNdEx := len(m.ActiveChannels) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.ActiveChannels[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintGenesis(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

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

func (m *ActiveChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.IsMiddlewareEnabled {
		i--
		if m.IsMiddlewareEnabled {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x20
	}
	if len(m.ChannelId) > 0 {
		i -= len(m.ChannelId)
		copy(dAtA[i:], m.ChannelId)
		i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChannelId)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.PortId) > 0 {
		i -= len(m.PortId)
		copy(dAtA[i:], m.PortId)
		i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.ConnectionId) > 0 {
		i -= len(m.ConnectionId)
		copy(dAtA[i:], m.ConnectionId)
		i = encodeVarintGenesis(dAtA, i, uint64(len(m.ConnectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *RegisteredInterchainAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.AccountAddress) > 0 {
		i -= len(m.AccountAddress)
		copy(dAtA[i:], m.AccountAddress)
		i = encodeVarintGenesis(dAtA, i, uint64(len(m.AccountAddress)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.PortId) > 0 {
		i -= len(m.PortId)
		copy(dAtA[i:], m.PortId)
		i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.ConnectionId) > 0 {
		i -= len(m.ConnectionId)
		copy(dAtA[i:], m.ConnectionId)
		i = encodeVarintGenesis(dAtA, i, uint64(len(m.ConnectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
	offset -= sovGenesis(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *GenesisState) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.ControllerGenesisState.Size()
	n += 1 + l + sovGenesis(uint64(l))
	l = m.HostGenesisState.Size()
	n += 1 + l + sovGenesis(uint64(l))
	return n
}

func (m *ControllerGenesisState) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.ActiveChannels) > 0 {
		for _, e := range m.ActiveChannels {
			l = e.Size()
			n += 1 + l + sovGenesis(uint64(l))
		}
	}
	if len(m.InterchainAccounts) > 0 {
		for _, e := range m.InterchainAccounts {
			l = e.Size()
			n += 1 + l + sovGenesis(uint64(l))
		}
	}
	if len(m.Ports) > 0 {
		for _, s := range m.Ports {
			l = len(s)
			n += 1 + l + sovGenesis(uint64(l))
		}
	}
	l = m.Params.Size()
	n += 1 + l + sovGenesis(uint64(l))
	return n
}

func (m *HostGenesisState) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.ActiveChannels) > 0 {
		for _, e := range m.ActiveChannels {
			l = e.Size()
			n += 1 + l + sovGenesis(uint64(l))
		}
	}
	if len(m.InterchainAccounts) > 0 {
		for _, e := range m.InterchainAccounts {
			l = e.Size()
			n += 1 + l + sovGenesis(uint64(l))
		}
	}
	l = len(m.Port)
	if l > 0 {
		n += 1 + l + sovGenesis(uint64(l))
	}
	l = m.Params.Size()
	n += 1 + l + sovGenesis(uint64(l))
	return n
}

func (m *ActiveChannel) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ConnectionId)
	if l > 0 {
		n += 1 + l + sovGenesis(uint64(l))
	}
	l = len(m.PortId)
	if l > 0 {
		n += 1 + l + sovGenesis(uint64(l))
	}
	l = len(m.ChannelId)
	if l > 0 {
		n += 1 + l + sovGenesis(uint64(l))
	}
	if m.IsMiddlewareEnabled {
		n += 2
	}
	return n
}

func (m *RegisteredInterchainAccount) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ConnectionId)
	if l > 0 {
		n += 1 + l + sovGenesis(uint64(l))
	}
	l = len(m.PortId)
	if l > 0 {
		n += 1 + l + sovGenesis(uint64(l))
	}
	l = len(m.AccountAddress)
	if l > 0 {
		n += 1 + l + sovGenesis(uint64(l))
	}
	return n
}

func sovGenesis(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozGenesis(x uint64) (n int) {
	return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *GenesisState) 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 ErrIntOverflowGenesis
			}
			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: GenesisState: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ControllerGenesisState", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.ControllerGenesisState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field HostGenesisState", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.HostGenesisState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipGenesis(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthGenesis
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ControllerGenesisState) 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 ErrIntOverflowGenesis
			}
			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: ControllerGenesisState: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ControllerGenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ActiveChannels", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ActiveChannels = append(m.ActiveChannels, ActiveChannel{})
			if err := m.ActiveChannels[len(m.ActiveChannels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field InterchainAccounts", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.InterchainAccounts = append(m.InterchainAccounts, RegisteredInterchainAccount{})
			if err := m.InterchainAccounts[len(m.InterchainAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				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 ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Ports = append(m.Ports, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 4:
			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 ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			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 := skipGenesis(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthGenesis
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *HostGenesisState) 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 ErrIntOverflowGenesis
			}
			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: HostGenesisState: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: HostGenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ActiveChannels", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ActiveChannels = append(m.ActiveChannels, ActiveChannel{})
			if err := m.ActiveChannels[len(m.ActiveChannels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field InterchainAccounts", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.InterchainAccounts = append(m.InterchainAccounts, RegisteredInterchainAccount{})
			if err := m.InterchainAccounts[len(m.InterchainAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				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 ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Port = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			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 ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			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 := skipGenesis(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthGenesis
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ActiveChannel) 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 ErrIntOverflowGenesis
			}
			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: ActiveChannel: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ActiveChannel: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				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 ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ConnectionId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				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 ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PortId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				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 ErrInvalidLengthGenesis
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthGenesis
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ChannelId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field IsMiddlewareEnabled", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowGenesis
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.IsMiddlewareEnabled = bool(v != 0)
		default:
			iNdEx = preIndex
			skippy, err := skipGenesis(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthGenesis
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

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

var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
