Synopsis
Learn what changes to make to bind modules to their ports on initialization.Pre-requisite readings
Note thatportIDdoes not refer to a certain numerical ID, likelocalhost:8080with aportID8080. 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.
- Add port ID to the
GenesisStateproto definition:
- Add port ID as a key to the module store:
- Add port ID to
x/<moduleName>/types/genesis.go:
- Set the port in the module keeper’s for
InitGenesis:
The capability module has been removed so port binding has also changed