Skip to content

Commit

Permalink
fix: set localhost for ibc allow clients
Browse files Browse the repository at this point in the history
  • Loading branch information
taramakage committed Oct 9, 2023
1 parent 99d8d4b commit 4cde6c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (app *IrisApp) appKeepers() upgrades.AppKeepers {
GetKey: app.GetKey,
ModuleManager: app.mm,
TIBCkeeper: app.TIBCKeeper,
IBCKeeper: app.IBCKeeper,
EvmKeeper: app.EvmKeeper,
FeeMarketKeeper: app.FeeMarketKeeper,
TokenKeeper: app.TokenKeeper,
Expand Down
2 changes: 2 additions & 0 deletions app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

tibckeeper "github.com/bianjieai/tibc-go/modules/tibc/core/keeper"

Expand Down Expand Up @@ -53,6 +54,7 @@ type AppKeepers struct {
GetKey func(moduleName string) *storetypes.KVStoreKey
ModuleManager *module.Manager
TIBCkeeper *tibckeeper.Keeper
IBCKeeper *ibckeeper.Keeper
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper
TokenKeeper tokenkeeper.Keeper
Expand Down
7 changes: 7 additions & 0 deletions app/upgrades/v210/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/cosmos/ibc-go/v7/modules/core/exported"

ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types"

Expand Down Expand Up @@ -40,6 +41,12 @@ func upgradeHandlerConstructor(
// proposals,
// )

// Enable 09-localhost type in allowed clients according to
// https://github.com/cosmos/ibc-go/blob/v7.3.0/docs/migrations/v7-to-v7_1.md
params := app.IBCKeeper.ClientKeeper.GetParams(ctx)
params.AllowedClients = append(params.AllowedClients, exported.Localhost)
app.IBCKeeper.ClientKeeper.SetParams(ctx, params)

// Migrate Tendermint consensus parameters from x/params module to a
// dedicated x/consensus module.
baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace).
Expand Down

0 comments on commit 4cde6c3

Please sign in to comment.