Synopsis
Learn how to configure the Fee Middleware module with IBC applications. The following document is intended for developers building on top of the Cosmos SDK and only applies for Cosmos SDK chains.Pre-requisite Readings
The Fee Middleware module, as the name suggests, plays the role of an IBC middleware and as such must be configured by chain developers to route and handle IBC messages correctly. For Cosmos SDK chains this setup is done via theapp/app.go
file, where modules are constructed and configured in order to bootstrap the blockchain application.
Example integration of the Fee Middleware module
Configuring an application stack with Fee Middleware
As mentioned in IBC middleware development an application stack may be composed of many or no middlewares that nest a base application. These layers form the complete set of application logic that enable developers to build composable and flexible IBC application stacks. For example, an application stack may be just a single base application liketransfer
, however, the same application stack composed with 29-fee
will nest the transfer
base application
by wrapping it with the Fee Middleware module.
Transfer
See below for an example of how to create an application stack usingtransfer
and 29-fee
.
The following transferStack
is configured in app/app.go
and added to the IBC Router
.
The in-line comments describe the execution flow of packets between the application stack and IBC core.
Interchain Accounts
See below for an example of how to create an application stack using27-interchain-accounts
and 29-fee
.
The following icaControllerStack
and icaHostStack
are configured in app/app.go
and added to the IBC Router
with the associated authentication module.
The in-line comments describe the execution flow of packets between the application stack and IBC core.