From a32dae7abec5207770c7bc8b9a9a2e52638b671d Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Tue, 10 Dec 2024 20:44:33 +0100 Subject: [PATCH] feat(#237): Added keeper for encounters --- x/cardchain/keeper/keeper.go | 3 +++ x/cardchain/types/keys.go | 1 + 2 files changed, 4 insertions(+) diff --git a/x/cardchain/keeper/keeper.go b/x/cardchain/keeper/keeper.go index 95606c56..f7e61909 100644 --- a/x/cardchain/keeper/keeper.go +++ b/x/cardchain/keeper/keeper.go @@ -36,6 +36,7 @@ type Keeper struct { RunningAverages gtk.KeywordedGenericTypeKeeper[*types.RunningAverage] Pools gtk.KeywordedGenericTypeKeeper[*sdk.Coin] Images gtk.GenericTypeKeeper[*types.Image] + Encounters gtk.GenericTypeKeeper[*types.Encounter] FeatureFlagModuleInstance ffKeeper.ModuleInstance BankKeeper types.BankKeeper @@ -55,6 +56,7 @@ func NewKeeper( imagesStorekey storetypes.StoreKey, serversStoreKey storetypes.StoreKey, zealyStoreKey storetypes.StoreKey, + encountersStoreKey storetypes.StoreKey, internalStoreKey storetypes.StoreKey, ps paramtypes.Subspace, @@ -82,6 +84,7 @@ func NewKeeper( Pools: gtk.NewKGTK[*sdk.Coin](poolsStoreKey, internalStoreKey, cdc, gtk.GetEmpty[sdk.Coin], []string{PublicPoolKey, WinnersPoolKey, BalancersPoolKey}), Images: gtk.NewGTK[*types.Image](imagesStorekey, internalStoreKey, cdc, gtk.GetEmpty[types.Image]), Servers: gtk.NewGTK[*types.Server](serversStoreKey, internalStoreKey, cdc, gtk.GetEmpty[types.Server]), + Encounters: gtk.NewGTK[*types.Encounter](encountersStoreKey, internalStoreKey, cdc, gtk.GetEmpty[types.Encounter]), FeatureFlagModuleInstance: featureFlagKeeper.GetModuleInstance(types.ModuleName, []string{string(types.FeatureFlagName_Council), string(types.FeatureFlagName_Matches)}), BankKeeper: bankKeeper, diff --git a/x/cardchain/types/keys.go b/x/cardchain/types/keys.go index 7ccbd5aa..ccc35b76 100644 --- a/x/cardchain/types/keys.go +++ b/x/cardchain/types/keys.go @@ -15,6 +15,7 @@ const ( CouncilsStoreKey = "Councils" ServersStoreKey = "Servers" ZealyStoreKey = "Zealy" + EncountersStoreKey = "Encounters" InternalStoreKey = "Internal" RunningAveragesStoreKey = "RunningAverages" ImagesStoreKey = "Images"