@@ -96,6 +96,9 @@ import (
96
96
monitoringptypes "github.com/tendermint/spn/x/monitoringp/types"
97
97
98
98
"github.com/web-tree/story/docs"
99
+ storymodule "github.com/web-tree/story/x/story"
100
+ storymodulekeeper "github.com/web-tree/story/x/story/keeper"
101
+ storymoduletypes "github.com/web-tree/story/x/story/types"
99
102
// this line is used by starport scaffolding # stargate/app/moduleImport
100
103
)
101
104
@@ -149,6 +152,7 @@ var (
149
152
transfer.AppModuleBasic {},
150
153
vesting.AppModuleBasic {},
151
154
monitoringp.AppModuleBasic {},
155
+ storymodule.AppModuleBasic {},
152
156
// this line is used by starport scaffolding # stargate/app/moduleBasic
153
157
)
154
158
@@ -220,6 +224,8 @@ type App struct {
220
224
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
221
225
ScopedMonitoringKeeper capabilitykeeper.ScopedKeeper
222
226
227
+ ScopedStoryKeeper capabilitykeeper.ScopedKeeper
228
+ StoryKeeper storymodulekeeper.Keeper
223
229
// this line is used by starport scaffolding # stargate/app/keeperDeclaration
224
230
225
231
// mm is the module manager
@@ -256,6 +262,7 @@ func New(
256
262
minttypes .StoreKey , distrtypes .StoreKey , slashingtypes .StoreKey ,
257
263
govtypes .StoreKey , paramstypes .StoreKey , ibchost .StoreKey , upgradetypes .StoreKey , feegrant .StoreKey ,
258
264
evidencetypes .StoreKey , ibctransfertypes .StoreKey , capabilitytypes .StoreKey , monitoringptypes .StoreKey ,
265
+ storymoduletypes .StoreKey ,
259
266
// this line is used by starport scaffolding # stargate/app/storeKey
260
267
)
261
268
tkeys := sdk .NewTransientStoreKeys (paramstypes .TStoreKey )
@@ -369,12 +376,26 @@ func New(
369
376
)
370
377
monitoringModule := monitoringp .NewAppModule (appCodec , app .MonitoringKeeper )
371
378
379
+ scopedStoryKeeper := app .CapabilityKeeper .ScopeToModule (storymoduletypes .ModuleName )
380
+ app .ScopedStoryKeeper = scopedStoryKeeper
381
+ app .StoryKeeper = * storymodulekeeper .NewKeeper (
382
+ appCodec ,
383
+ keys [storymoduletypes .StoreKey ],
384
+ keys [storymoduletypes .MemStoreKey ],
385
+ app .GetSubspace (storymoduletypes .ModuleName ),
386
+ app .IBCKeeper .ChannelKeeper ,
387
+ & app .IBCKeeper .PortKeeper ,
388
+ scopedStoryKeeper ,
389
+ )
390
+ storyModule := storymodule .NewAppModule (appCodec , app .StoryKeeper , app .AccountKeeper , app .BankKeeper )
391
+
372
392
// this line is used by starport scaffolding # stargate/app/keeperDefinition
373
393
374
394
// Create static IBC router, add transfer route, then set and seal it
375
395
ibcRouter := ibcporttypes .NewRouter ()
376
396
ibcRouter .AddRoute (ibctransfertypes .ModuleName , transferModule )
377
397
ibcRouter .AddRoute (monitoringptypes .ModuleName , monitoringModule )
398
+ ibcRouter .AddRoute (storymoduletypes .ModuleName , storyModule )
378
399
// this line is used by starport scaffolding # ibc/app/router
379
400
app .IBCKeeper .SetRouter (ibcRouter )
380
401
@@ -409,6 +430,7 @@ func New(
409
430
params .NewAppModule (app .ParamsKeeper ),
410
431
transferModule ,
411
432
monitoringModule ,
433
+ storyModule ,
412
434
// this line is used by starport scaffolding # stargate/app/appModule
413
435
)
414
436
@@ -435,6 +457,7 @@ func New(
435
457
feegrant .ModuleName ,
436
458
paramstypes .ModuleName ,
437
459
monitoringptypes .ModuleName ,
460
+ storymoduletypes .ModuleName ,
438
461
// this line is used by starport scaffolding # stargate/app/beginBlockers
439
462
)
440
463
@@ -457,6 +480,7 @@ func New(
457
480
ibchost .ModuleName ,
458
481
ibctransfertypes .ModuleName ,
459
482
monitoringptypes .ModuleName ,
483
+ storymoduletypes .ModuleName ,
460
484
// this line is used by starport scaffolding # stargate/app/endBlockers
461
485
)
462
486
@@ -484,6 +508,7 @@ func New(
484
508
ibctransfertypes .ModuleName ,
485
509
feegrant .ModuleName ,
486
510
monitoringptypes .ModuleName ,
511
+ storymoduletypes .ModuleName ,
487
512
// this line is used by starport scaffolding # stargate/app/initGenesis
488
513
)
489
514
@@ -507,6 +532,7 @@ func New(
507
532
ibc .NewAppModule (app .IBCKeeper ),
508
533
transferModule ,
509
534
monitoringModule ,
535
+ storyModule ,
510
536
// this line is used by starport scaffolding # stargate/app/appModule
511
537
)
512
538
app .sm .RegisterStoreDecoders ()
@@ -696,6 +722,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
696
722
paramsKeeper .Subspace (ibctransfertypes .ModuleName )
697
723
paramsKeeper .Subspace (ibchost .ModuleName )
698
724
paramsKeeper .Subspace (monitoringptypes .ModuleName )
725
+ paramsKeeper .Subspace (storymoduletypes .ModuleName )
699
726
// this line is used by starport scaffolding # stargate/app/paramSubspace
700
727
701
728
return paramsKeeper
0 commit comments