Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add step about integrating regular light client to docs #2905

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/ibc/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,23 @@ The first step is to add the following modules to the `BasicManager`: `x/capabil
and `x/ibc-transfer`. After that, we need to grant `Minter` and `Burner` permissions to
the `ibc-transfer` `ModuleAccount` to mint and burn relayed tokens.

### Integrating Light Clients

> Note that from v7 onwards, all light clients have to be explicitly registered in a chain's app.go and follow the steps listed below.
This is in contrast to earlier versions of ibc-go when 07-tendermint and 06-solomachine were added out of the box.

All light clients must be registered with `module.BasicManager` in a chain's app.go file.

The following code example shows how to register the existing `ibctm.AppModuleBasic{}` light client implementation.

```go

import (
...
ibctm "github.com/cosmos/ibc-go/v6/modules/light-clients/07-tendermint"
...
)

// app.go
var (

Expand All @@ -37,6 +53,9 @@ var (
capability.AppModuleBasic{},
ibc.AppModuleBasic{},
transfer.AppModuleBasic{}, // i.e ibc-transfer module

// register light clients on IBC
ibctm.AppModuleBasic{},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be helpful to show the import statement as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call!

)

// module account permissions
Expand Down