Skip to content

Commit

Permalink
scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Oct 1, 2021
1 parent 056e640 commit 1438bb8
Show file tree
Hide file tree
Showing 94 changed files with 22,548 additions and 569 deletions.
19 changes: 19 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ import (
"github.com/tendermint/spm/openapiconsole"

"github.com/cosmonaut/loan/docs"
loanmodule "github.com/cosmonaut/loan/x/loan"
loanmodulekeeper "github.com/cosmonaut/loan/x/loan/keeper"
loanmoduletypes "github.com/cosmonaut/loan/x/loan/types"
// this line is used by starport scaffolding # stargate/app/moduleImport
)

Expand Down Expand Up @@ -137,6 +140,7 @@ var (
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
loanmodule.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
)

Expand All @@ -149,6 +153,7 @@ var (
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
loanmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
// this line is used by starport scaffolding # stargate/app/maccPerms
}
)
Expand Down Expand Up @@ -205,6 +210,7 @@ type App struct {
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

LoanKeeper loanmodulekeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration

// the module manager
Expand Down Expand Up @@ -238,6 +244,7 @@ func New(
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,
loanmoduletypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand Down Expand Up @@ -336,6 +343,15 @@ func New(
&stakingKeeper, govRouter,
)

app.LoanKeeper = *loanmodulekeeper.NewKeeper(
appCodec,
keys[loanmoduletypes.StoreKey],
keys[loanmoduletypes.MemStoreKey],

app.BankKeeper,
)
loanModule := loanmodule.NewAppModule(appCodec, app.LoanKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition

// Create static IBC router, add transfer route, then set and seal it
Expand Down Expand Up @@ -374,6 +390,7 @@ func New(
ibc.NewAppModule(app.IBCKeeper),
params.NewAppModule(app.ParamsKeeper),
transferModule,
loanModule,
// this line is used by starport scaffolding # stargate/app/appModule
)

Expand Down Expand Up @@ -408,6 +425,7 @@ func New(
genutiltypes.ModuleName,
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
loanmoduletypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
)

Expand Down Expand Up @@ -595,6 +613,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(loanmoduletypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace

return paramsKeeper
Expand Down
Loading

0 comments on commit 1438bb8

Please sign in to comment.