Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CL): app wiring for concentrated liquidity module #3071

Merged
merged 4 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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