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 ICS27 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.
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
.