diff --git a/CHANGELOG.md b/CHANGELOG.md index 41746385d9d..1271033b7a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Misc Improvements * [#6309](https://github.com/osmosis-labs/osmosis/pull/6309) Add Cosmwasm Pool Queries to Stargate Query +* [#6476](https://github.com/osmosis-labs/osmosis/pull/6476) band-aid state export fix for cwpool gauges ### State Breaking diff --git a/x/pool-incentives/keeper/genesis.go b/x/pool-incentives/keeper/genesis.go index 166579fca9e..9e22b1418e9 100644 --- a/x/pool-incentives/keeper/genesis.go +++ b/x/pool-incentives/keeper/genesis.go @@ -42,9 +42,19 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { if err != nil { panic(err) } + + if pool.GetType() == poolmanagertypes.CosmWasm { + // TODO: remove this post-v19. In v19 we did not create a hook for cw pool gauges. + // Fix tracked in: + // https://github.com/osmosis-labs/osmosis/issues/6122 + ctx.Logger().Info("Skipping pool ID", "poolId", poolId, "reason", "cosmwasm pool") + continue + } + isCLPool := pool.GetType() == poolmanagertypes.Concentrated if isCLPool { incParams := k.incentivesKeeper.GetEpochInfo(ctx) + gaugeID, err := k.GetPoolGaugeId(ctx, uint64(poolId), incParams.Duration) if err != nil { panic(err)