Skip to content

Commit e8b7e9d

Browse files
committed
optimize ibc
1 parent aac4d70 commit e8b7e9d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

app/app.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ import (
104104
icahostkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/keeper"
105105
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
106106
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
107+
ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee"
107108
ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper"
108109
ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
109110
"github.com/cosmos/ibc-go/v8/modules/apps/transfer"
110111
ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper"
111112
ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types"
112113
ibc "github.com/cosmos/ibc-go/v8/modules/core"
114+
ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
115+
ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
113116
ibcporttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
114117
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
115118
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
@@ -520,6 +523,7 @@ func New(
520523
app.IBCKeeper.ChannelKeeper,
521524
app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper,
522525
)
526+
ibcFeeModule := ibcfee.NewAppModule(app.IBCFeeKeeper)
523527

524528
// Create Transfer Keepers
525529
app.TransferKeeper = ibctransferkeeper.NewKeeper(
@@ -718,7 +722,9 @@ func New(
718722
ibc.NewAppModule(app.IBCKeeper),
719723
params.NewAppModule(app.ParamsKeeper),
720724
transferModule,
725+
ibcFeeModule,
721726
icaModule,
727+
ibctm.AppModule{},
722728
wasmModule,
723729

724730
btcbridgeModule,
@@ -1060,7 +1066,7 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig
10601066
nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
10611067

10621068
// Register grpc-gateway routes for all modules.
1063-
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
1069+
app.BasicModuleManager.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
10641070

10651071
if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil {
10661072
panic(err)
@@ -1103,10 +1109,14 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
11031109
paramsKeeper.Subspace(slashingtypes.ModuleName)
11041110
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) //nolint:staticcheck
11051111
paramsKeeper.Subspace(crisistypes.ModuleName)
1112+
1113+
keyTable := ibcclienttypes.ParamKeyTable()
1114+
keyTable.RegisterParamSet(&ibcconnectiontypes.Params{})
11061115
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
11071116
paramsKeeper.Subspace(ibcexported.ModuleName)
11081117
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
11091118
paramsKeeper.Subspace(icahosttypes.SubModuleName)
1119+
11101120
paramsKeeper.Subspace(btcbridgetypes.ModuleName)
11111121
paramsKeeper.Subspace(incentivetypes.ModuleName)
11121122
// this line is used by starport scaffolding # stargate/app/paramSubspace

0 commit comments

Comments
 (0)