From f7343e56ffc4cc9da347607a8f41440846836a5d Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:05:07 +0900 Subject: [PATCH] fix scoped capability keepers --- app/app.go | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/app/app.go b/app/app.go index 8c86249..86c12fc 100644 --- a/app/app.go +++ b/app/app.go @@ -317,12 +317,12 @@ func NewMinitiaApp( app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) // grant capabilities for the ibc and ibc-transfer modules - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) - scopedICAControllerKeeper := app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) - scopedICAAuthKeeper := app.CapabilityKeeper.ScopeToModule(icaauthtypes.ModuleName) - scopedWasmKeeper := app.CapabilityKeeper.ScopeToModule(wasmtypes.ModuleName) + app.ScopedIBCKeeper = app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) + app.ScopedTransferKeeper = app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) + app.ScopedICAHostKeeper = app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) + app.ScopedICAControllerKeeper = app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) + app.ScopedICAAuthKeeper = app.CapabilityKeeper.ScopeToModule(icaauthtypes.ModuleName) + app.ScopedWasmKeeper = app.CapabilityKeeper.ScopeToModule(wasmtypes.ModuleName) app.ScopedICQKeeper = app.CapabilityKeeper.ScopeToModule(icqtypes.ModuleName) app.ScopedFetchPriceKeeper = app.CapabilityKeeper.ScopeToModule(fetchpricetypes.ModuleName) @@ -421,7 +421,7 @@ func NewMinitiaApp( nil, // we don't need migration app.OPChildKeeper, app.UpgradeKeeper, - scopedIBCKeeper, + app.ScopedIBCKeeper, authorityAddr, ) @@ -458,7 +458,7 @@ func NewMinitiaApp( app.IBCKeeper.PortKeeper, app.AccountKeeper, app.BankKeeper, - scopedTransferKeeper, + app.ScopedTransferKeeper, authorityAddr, ) app.TransferKeeper = &transferKeeper @@ -647,7 +647,7 @@ func NewMinitiaApp( app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper, - scopedWasmKeeper, + app.ScopedWasmKeeper, app.TransferKeeper, app.MsgServiceRouter(), app.GRPCQueryRouter(), @@ -904,13 +904,6 @@ func NewMinitiaApp( } } - app.ScopedIBCKeeper = scopedIBCKeeper - app.ScopedTransferKeeper = scopedTransferKeeper - app.ScopedICAHostKeeper = scopedICAHostKeeper - app.ScopedICAControllerKeeper = scopedICAControllerKeeper - app.ScopedICAAuthKeeper = scopedICAAuthKeeper - app.ScopedWasmKeeper = scopedWasmKeeper - return app }