If you use our Scaffold to create App, you are able to find TODOs in app.go
. Follow those TODOs to config the Modules in app.go
file.
// TODO : Import of nft & xnft
"github.com/FreeFlixMedia/modules/nfts"
"github.com/FreeFlixMedia/modules/xnfts"
// TODO: Add nft & xnft module(s) AppModuleBasic
nfts.AppModuleBasic{},
xnfts.AppModuleBasic{},
// TODO: Add nft & xnft Keeper
nftKeeper nfts.Keeper
xnftKeeper xnfts.Keeper
// TODO: Add scoped xnft Keeper
scopedXNFTKeeper capability.ScopedKeeper
// TODO: Add the keys that module requires
nfts.StoreKey, xnfts.StoreKey
// TODO: Add scopedXNFTKeeper
scopedXNFTKeeper := app.capabilityKeeper.ScopeToModule(xnfts.ModuleName)
// TODO: initialize nft & xnft Keepers
app.nftKeeper = nfts.NewKeeper(app.cdc, keys[nfts.StoreKey])
app.xnftKeeper = xnfts.NewKeeper(app.cdc, keys[xnfts.StoreKey], app.nftKeeper, app.bankKeeper,app.ibcKeeper.ChannelKeeper, &app.ibcKeeper.PortKeeper, scopedXNFTKeeper)
xnftModule := xnfts.NewAppModule(app.xnftKeeper)
// TODO: Add xnft Route
ibcRouter.AddRoute(xnfts.ModuleName, xnftModule)
// TODO: Add nft & xnft module(s)
nfts.NewAppModule(app.nftKeeper),
xnftModule,
// TODO: Init nft & xnft module(s)
nfts.StoreKey,
xnfts.StoreKey,
//TODO: Add ScopedXNFTKeeper
app.scopedXNFTKeeper= scopedXNFTKeeper