From 5030ab4c0b28941326a562dbc3a249fe0ea2a1a3 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 19 Oct 2022 22:38:42 -0500 Subject: [PATCH] feat(CL): app wiring for concentrated liquidity module (#3071) * feat(CL): app wiring for concentrated liquidity module * lint * field --- app/keepers/keepers.go | 4 ++++ x/concentrated-liquidity/keeper.go | 7 +++---- x/concentrated-liquidity/types/keys.go | 7 +++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 87ecc2b6d12..24b7399cbc8 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -52,6 +52,7 @@ import ( _ "github.com/osmosis-labs/osmosis/v12/client/docs/statik" owasm "github.com/osmosis-labs/osmosis/v12/wasmbinding" concentratedliquidity "github.com/osmosis-labs/osmosis/v12/x/concentrated-liquidity" + concentratedliquiditytypes "github.com/osmosis-labs/osmosis/v12/x/concentrated-liquidity/types" epochskeeper "github.com/osmosis-labs/osmosis/v12/x/epochs/keeper" epochstypes "github.com/osmosis-labs/osmosis/v12/x/epochs/types" gammkeeper "github.com/osmosis-labs/osmosis/v12/x/gamm/keeper" @@ -256,6 +257,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.GetSubspace(twaptypes.ModuleName), appKeepers.GAMMKeeper) + appKeepers.ConcentratedLiquidityKeeper = concentratedliquidity.NewKeeper( + appKeepers.keys[concentratedliquiditytypes.StoreKey]) + appKeepers.SwapRouterKeeper = swaprouter.NewKeeper( appKeepers.keys[swaproutertypes.StoreKey], appKeepers.GetSubspace(swaproutertypes.ModuleName), diff --git a/x/concentrated-liquidity/keeper.go b/x/concentrated-liquidity/keeper.go index 41088238bff..b71f408e19a 100644 --- a/x/concentrated-liquidity/keeper.go +++ b/x/concentrated-liquidity/keeper.go @@ -5,10 +5,9 @@ import ( ) type Keeper struct { - storeKey sdk.StoreKey - transientKey *sdk.TransientStoreKey + storeKey sdk.StoreKey } -func NewKeeper(storeKey sdk.StoreKey, transientKey *sdk.TransientStoreKey) *Keeper { - return &Keeper{storeKey: storeKey, transientKey: transientKey} +func NewKeeper(storeKey sdk.StoreKey) *Keeper { + return &Keeper{storeKey: storeKey} } diff --git a/x/concentrated-liquidity/types/keys.go b/x/concentrated-liquidity/types/keys.go index 5c5647fde8c..c2283bdf0d2 100644 --- a/x/concentrated-liquidity/types/keys.go +++ b/x/concentrated-liquidity/types/keys.go @@ -7,11 +7,10 @@ import ( ) const ( - ModuleName = "twap" + ModuleName = "concentrated-liquidity" - StoreKey = ModuleName - TransientStoreKey = "transient_" + ModuleName // this is silly we have to do this - RouterKey = ModuleName + StoreKey = ModuleName + RouterKey = ModuleName QuerierRoute = ModuleName // Contract: Coin denoms cannot contain this character