Synopsis
Learn how to integrate Interchain Accounts host and controller functionality to your chain. The following document only applies for Cosmos SDK chains. The Interchain Accounts module contains two submodules. Each submodule has its own IBC application. The Interchain Accounts module should be registered as anAppModule
in the same way all SDK modules are registered on a chain, but each submodule should create its own IBCModule
as necessary. A route should be added to the IBC router for each submodule which will be used.
Chains who wish to support ICS-27 may elect to act as a host chain, a controller chain or both. Disabling host or controller functionality may be done statically by excluding the host or controller submodule entirely from the app.go
file or it may be done dynamically by taking advantage of the on-chain parameters which enable or disable the host or controller submodules.
Interchain Account authentication modules (both custom or generic, such as the x/gov
, x/group
or x/auth
Cosmos SDK modules) can send messages to the controller submodule’s MsgServer
to register interchain accounts and send packets to the interchain account. To accomplish this, the authentication module needs to be composed with baseapp
’s MsgServiceRouter
.

Please note that since ibc-go v7.5.0 it is mandatory to register the gRPC query router after the creation of the host submodule’s keeper; otherwise, nodes will not start. The query router is used to execute on the host query messages encoded in the ICA packet data. Please check the sample integration code below for more details.
Example integration
ICAAuthKeeper
and icaAuthModule
can be removed. That’s it, the following code would not be needed:
Using submodules exclusively
As described above, the Interchain Accounts application module is structured to support the ability of exclusively enabling controller or host functionality. This can be achieved by simply omitting either controller or hostKeeper
from the Interchain Accounts NewAppModule
constructor function, and mounting only the desired submodule via the IBCRouter
.
Alternatively, submodules can be enabled and disabled dynamically using on-chain parameters.
The following snippets show basic examples of statically disabling submodules using app.go
.