Skip to content

Instantly share code, notes, and snippets.

@fadeev
Created August 24, 2021 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fadeev/693779f393bbb94e965d0b62a463b0ab to your computer and use it in GitHub Desktop.
Save fadeev/693779f393bbb94e965d0b62a463b0ab to your computer and use it in GitHub Desktop.
diff --git a/app/app.go b/app/app.go
index 666a944..14e10b8 100644
--- a/app/app.go
+++ b/app/app.go
@@ -84,6 +84,9 @@ import (
tmjson "github.com/tendermint/tendermint/libs/json"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
// this line is used by starport scaffolding # stargate/app/moduleImport
+ blogmodule "github.com/cosmos/gaia/x/blog"
+ blogmodulekeeper "github.com/cosmos/gaia/x/blog/keeper"
+ blogmoduletypes "github.com/cosmos/gaia/x/blog/types"
gaiamodule "github.com/cosmos/gaia/x/gaia"
gaiamodulekeeper "github.com/cosmos/gaia/x/gaia/keeper"
gaiamoduletypes "github.com/cosmos/gaia/x/gaia/types"
@@ -138,6 +141,7 @@ var (
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
+ blogmodule.AppModuleBasic{},
gaiamodule.AppModuleBasic{},
)
@@ -207,6 +211,8 @@ type App struct {
// this line is used by starport scaffolding # stargate/app/keeperDeclaration
+ BlogKeeper blogmodulekeeper.Keeper
+
GaiaKeeper gaiamodulekeeper.Keeper
// the module manager
@@ -242,6 +248,7 @@ func New(
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
+ blogmoduletypes.StoreKey,
gaiamoduletypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
@@ -345,6 +352,13 @@ func New(
)
gaiaModule := gaiamodule.NewAppModule(appCodec, app.GaiaKeeper)
+ app.BlogKeeper = *blogmodulekeeper.NewKeeper(
+ appCodec,
+ keys[blogmoduletypes.StoreKey],
+ keys[blogmoduletypes.MemStoreKey],
+ )
+ blogModule := blogmodule.NewAppModule(appCodec, app.BlogKeeper)
+
// this line is used by starport scaffolding # stargate/app/keeperDefinition
// Create static IBC router, add transfer route, then set and seal it
@@ -383,6 +397,7 @@ func New(
params.NewAppModule(app.ParamsKeeper),
transferModule,
// this line is used by starport scaffolding # stargate/app/appModule
+ blogModule,
gaiaModule,
)
@@ -417,6 +432,7 @@ func New(
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
+ blogmoduletypes.ModuleName,
gaiamoduletypes.ModuleName,
)
@@ -605,6 +621,7 @@ func initParamsKeeper(appCodec codec.BinaryMarshaler, legacyAmino *codec.LegacyA
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace
+ paramsKeeper.Subspace(blogmoduletypes.ModuleName)
paramsKeeper.Subspace(gaiamoduletypes.ModuleName)
return paramsKeeper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment