Skip to main content

Synopsis

Learn what changes to make to bind modules to their ports on initialization. Currently, ports must be bound on app initialization. In order to bind modules to their respective ports on initialization, the following needs to be implemented:
Note that portID does not refer to a certain numerical ID, like localhost:8080 with a portID 8080. Rather it refers to the application module the port binds. For IBC Modules built with the Cosmos SDK, it defaults to the module’s name and for Cosmwasm contracts it defaults to the contract address.
  1. Add port ID to the GenesisState proto definition:
  1. Add port ID as a key to the module store:
  1. Add port ID to x/<moduleName>/types/genesis.go:
  1. Set the port in the module keeper’s for InitGenesis:
The capability module has been removed so port binding has also changed
The module is set to the desired port. The setting and sealing happens during creation of the IBC router.