Skip to content

Instantly share code, notes, and snippets.

@fadeev
Created October 15, 2021 06:53
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/d31540178d1b1bf24b30cbd3ba662c56 to your computer and use it in GitHub Desktop.
Save fadeev/d31540178d1b1bf24b30cbd3ba662c56 to your computer and use it in GitHub Desktop.
diff --git a/app/app.go b/app/app.go
index 2e98e62..db0ea46 100644
--- a/app/app.go
+++ b/app/app.go
@@ -88,6 +88,9 @@ import (
"github.com/cosmonaut/testchain/docs"
+ foobarmodule "github.com/cosmonaut/testchain/x/foobar"
+ foobarmodulekeeper "github.com/cosmonaut/testchain/x/foobar/keeper"
+ foobarmoduletypes "github.com/cosmonaut/testchain/x/foobar/types"
testchainmodule "github.com/cosmonaut/testchain/x/testchain"
testchainmodulekeeper "github.com/cosmonaut/testchain/x/testchain/keeper"
testchainmoduletypes "github.com/cosmonaut/testchain/x/testchain/types"
@@ -142,6 +145,7 @@ var (
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
testchainmodule.AppModuleBasic{},
+ foobarmodule.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
)
@@ -211,6 +215,8 @@ type App struct {
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
TestchainKeeper testchainmodulekeeper.Keeper
+
+ FoobarKeeper foobarmodulekeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration
// the module manager
@@ -245,6 +251,7 @@ func New(
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,
testchainmoduletypes.StoreKey,
+ foobarmoduletypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
@@ -350,6 +357,13 @@ func New(
)
testchainModule := testchainmodule.NewAppModule(appCodec, app.TestchainKeeper)
+ app.FoobarKeeper = *foobarmodulekeeper.NewKeeper(
+ appCodec,
+ keys[foobarmoduletypes.StoreKey],
+ keys[foobarmoduletypes.MemStoreKey],
+ )
+ foobarModule := foobarmodule.NewAppModule(appCodec, app.FoobarKeeper)
+
// this line is used by starport scaffolding # stargate/app/keeperDefinition
// Create static IBC router, add transfer route, then set and seal it
@@ -389,6 +403,7 @@ func New(
params.NewAppModule(app.ParamsKeeper),
transferModule,
testchainModule,
+ foobarModule,
// this line is used by starport scaffolding # stargate/app/appModule
)
@@ -424,6 +439,7 @@ func New(
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
testchainmoduletypes.ModuleName,
+ foobarmoduletypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
)
@@ -612,6 +628,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(testchainmoduletypes.ModuleName)
+ paramsKeeper.Subspace(foobarmoduletypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace
return paramsKeeper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment