Skip to content

Commit

Permalink
feat(CL): app wiring for concentrated liquidity module (#3071)
Browse files Browse the repository at this point in the history
* feat(CL): app wiring for concentrated liquidity module

* lint

* field
  • Loading branch information
p0mvn authored Oct 20, 2022
1 parent c13b7ea commit 5030ab4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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),
Expand Down
7 changes: 3 additions & 4 deletions x/concentrated-liquidity/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
7 changes: 3 additions & 4 deletions x/concentrated-liquidity/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5030ab4

Please sign in to comment.