@@ -91,11 +91,6 @@ type App struct {
9191 txConfig client.TxConfig
9292 interfaceRegistry codectypes.InterfaceRegistry
9393
94- // non depinject support modules store keys
95- keys map[string]*storetypes.KVStoreKey
96- memKeys map[string]*storetypes.MemoryStoreKey
97- tkeys map[string]*storetypes.TransientStoreKey
98-
9994 // keepers
10095 AccountKeeper authkeeper.AccountKeeper
10196 BankKeeper bankkeeper.Keeper
@@ -233,8 +228,8 @@ func New(
233228 &app.FeeGrantKeeper,
234229 &app.GroupKeeper,
235230 &app.ConsensusParamsKeeper,
236- // this line is used by starport scaffolding # stargate/app/keeperDefinition
237231 &app.CircuitBreakerKeeper,
232+ // this line is used by starport scaffolding # stargate/app/keeperDefinition
238233 ); err != nil {
239234 panic(err)
240235 }
@@ -317,9 +312,6 @@ func New(
317312 return app
318313}
319314
320- // Name returns the name of the App
321- func (app *App) Name() string { return app.BaseApp.Name() }
322-
323315// LegacyAmino returns App's amino codec.
324316//
325317// NOTE: This is solely to be used for testing purposes as it may be desirable
@@ -348,10 +340,6 @@ func (app *App) TxConfig() client.TxConfig {
348340
349341// GetKey returns the KVStoreKey for the provided store key.
350342func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey {
351- if key, ok := app.keys[storeKey]; ok {
352- return key
353- }
354-
355343 sk := app.UnsafeFindStoreKey(storeKey)
356344 kvStoreKey, ok := sk.(*storetypes.KVStoreKey)
357345 if !ok {
@@ -360,6 +348,16 @@ func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey {
360348 return kvStoreKey
361349}
362350
351+ // GetMemKey returns the MemoryStoreKey for the provided store key.
352+ func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey {
353+ key, ok := app.UnsafeFindStoreKey(storeKey).(*storetypes.MemoryStoreKey)
354+ if !ok {
355+ return nil
356+ }
357+
358+ return key
359+ }
360+
363361// kvStoreKeys returns all the kv store keys registered inside App.
364362func (app *App) kvStoreKeys() map[string]*storetypes.KVStoreKey {
365363 keys := make(map[string]*storetypes.KVStoreKey)
@@ -369,10 +367,6 @@ func (app *App) kvStoreKeys() map[string]*storetypes.KVStoreKey {
369367 }
370368 }
371369
372- for _, kv := range app.keys {
373- keys[kv.Name()] = kv
374- }
375-
376370 return keys
377371}
378372
0 commit comments