Deprecation Notice
This document is deprecated and will be removed in future releases.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 module 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 are the base application of a middleware stack. The controller submodule is the middleware in this stack.

Please note that since ibc-go v6 the channel capability is claimed by the controller submodule and therefore it is not required for authentication modules to claim the capability in the OnChanOpenInit
callback. Therefore the custom authentication module does not need a scoped keeper anymore.
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
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
.