Skip to content

Commit

Permalink
fix scoped capability keepers
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Feb 2, 2024
1 parent a54f0ea commit f7343e5
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -421,7 +421,7 @@ func NewMinitiaApp(
nil, // we don't need migration
app.OPChildKeeper,
app.UpgradeKeeper,
scopedIBCKeeper,
app.ScopedIBCKeeper,
authorityAddr,
)

Expand Down Expand Up @@ -458,7 +458,7 @@ func NewMinitiaApp(
app.IBCKeeper.PortKeeper,
app.AccountKeeper,
app.BankKeeper,
scopedTransferKeeper,
app.ScopedTransferKeeper,
authorityAddr,
)
app.TransferKeeper = &transferKeeper
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit f7343e5

Please sign in to comment.