Skip to content

Commit

Permalink
refactor: inline scoped keepers (#3053)
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp authored Jan 29, 2024
1 parent 762718b commit edf2b8d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ func New(
app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey])

// grant capabilities for the ibc and ibc-transfer modules
scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)
app.ScopedIBCKeeper = app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName)
app.ScopedTransferKeeper = app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName)

// add keepers
app.AccountKeeper = authkeeper.NewAccountKeeper(
Expand Down Expand Up @@ -309,7 +309,7 @@ func New(

// Create IBC Keeper
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, app.ScopedIBCKeeper,
)

paramBlockList := paramfilter.NewParamBlockList(app.BlockedParams()...)
Expand All @@ -325,7 +325,7 @@ func New(
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
tokenFilterKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper,
app.AccountKeeper, app.BankKeeper, app.ScopedTransferKeeper,
)
transferModule := transfer.NewAppModule(app.TransferKeeper)

Expand Down Expand Up @@ -508,9 +508,6 @@ func New(
}
}

app.ScopedIBCKeeper = scopedIBCKeeper
app.ScopedTransferKeeper = scopedTransferKeeper

return app
}

Expand Down

0 comments on commit edf2b8d

Please sign in to comment.