Skip to content

Commit

Permalink
✨ Integrate x/group
Browse files Browse the repository at this point in the history
  • Loading branch information
nnkken committed Mar 8, 2023
1 parent 0b0c481 commit 32d2456
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
"github.com/cosmos/cosmos-sdk/x/group"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"
"github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
Expand Down Expand Up @@ -140,6 +143,7 @@ var (
evidence.AppModuleBasic{},
feegrantmodule.AppModuleBasic{},
authzmodule.AppModuleBasic{},
groupmodule.AppModuleBasic{},
nftmodule.AppModuleBasic{},

// IBC
Expand Down Expand Up @@ -199,6 +203,7 @@ type LikeApp struct {
TransferKeeper ibctransferkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
FeeGrantKeeper feegrantkeeper.Keeper
GroupKeeper groupkeeper.Keeper
IscnKeeper iscnkeeper.Keeper
NftKeeper nftkeeper.Keeper
LikeNftKeeper likenftkeeper.Keeper
Expand Down Expand Up @@ -249,6 +254,7 @@ func NewLikeApp(
iscntypes.StoreKey,
nftkeeper.StoreKey,
likenfttypes.StoreKey,
group.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, likenfttypes.MemStoreKey)
Expand Down Expand Up @@ -306,6 +312,8 @@ func NewLikeApp(
app.BaseApp.MsgServiceRouter(),
app.AccountKeeper,
)
groupConfig := group.DefaultConfig()
app.GroupKeeper = groupkeeper.NewKeeper(keys[group.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper, groupConfig)
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(
appCodec,
keys[feegrant.StoreKey],
Expand Down Expand Up @@ -420,6 +428,7 @@ func NewLikeApp(
params.NewAppModule(app.ParamsKeeper),
authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
iscn.NewAppModule(app.IscnKeeper),
groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
nftmodule.NewAppModule(appCodec, app.NftKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
likenft.NewAppModule(appCodec, app.LikeNftKeeper, app.AccountKeeper, app.BankKeeper),
)
Expand Down Expand Up @@ -447,6 +456,7 @@ func NewLikeApp(
genutiltypes.ModuleName,
authz.ModuleName,
feegrant.ModuleName,
group.ModuleName,
paramstypes.ModuleName,
iscntypes.ModuleName,
nft.ModuleName,
Expand All @@ -469,6 +479,7 @@ func NewLikeApp(
evidencetypes.ModuleName,
authz.ModuleName,
feegrant.ModuleName,
group.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
iscntypes.ModuleName,
Expand Down Expand Up @@ -497,6 +508,7 @@ func NewLikeApp(
authz.ModuleName,
ibctransfertypes.ModuleName,
feegrant.ModuleName,
group.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
iscntypes.ModuleName,
Expand Down

0 comments on commit 32d2456

Please sign in to comment.