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

fix: update all migrated whitewhale contracts to code id 641 (backport #7966) #7971

Merged
merged 1 commit into from
Apr 5, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* [#7951](https://github.com/osmosis-labs/osmosis/pull/7951) Only migrate selected cl incentives
* [#7938](https://github.com/osmosis-labs/osmosis/pull/7938) Add missing swap events for missing swap event for cw pools.
* [#7957](https://github.com/osmosis-labs/osmosis/pull/7957) Update to the latest version of ibc-go
* [#7966](https://github.com/osmosis-labs/osmosis/pull/7966) Update all governance migrated white whale pools to code id 641

### SDK

Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v24/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func CreateUpgradeHandler(
// However, there was a problem in the migration logic where the CosmWasmpool state CodeId did not get updated.
// As a result, the CodeID for the contract that is tracked in x/wasmd was migrated correctly. However, the code ID that we track in the x/cosmwasmpool state did not.
// Therefore, we should perform a migration for each of the hardcoded white whale pools.
poolIds := []uint64{1463, 1462, 1461}
poolIds := []uint64{1584, 1575, 1514, 1463, 1462, 1461}
for _, poolId := range poolIds {
pool, err := keepers.CosmwasmPoolKeeper.GetPool(ctx, poolId)
if err != nil {
Expand All @@ -89,13 +89,13 @@ func CreateUpgradeHandler(
ActualPool: pool,
}
}
if cwPool.GetCodeId() != 503 {
if cwPool.GetCodeId() != 503 && cwPool.GetCodeId() != 572 {
ctx.Logger().Error("Pool has incorrect code id", "poolId", poolId, "codeId", cwPool.GetCodeId())
return nil, cwpooltypes.InvalidPoolTypeError{
ActualPool: pool,
}
}
cwPool.SetCodeId(572)
cwPool.SetCodeId(641)
keepers.CosmwasmPoolKeeper.SetPool(ctx, cwPool)
}

Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v24/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (s *UpgradeTestSuite) TestUpgrade() {
//

// Test that the white whale pools have been updated
s.requirePoolsHaveCodeId(whiteWhalePoolIds, 572)
s.requirePoolsHaveCodeId(whiteWhalePoolIds, 641)

// TXFEES Tests
//
Expand Down