Skip to content

Commit

Permalink
fix: update all migrated whitewhale contracts to code id 641 (#7966) (#…
Browse files Browse the repository at this point in the history
…7971)

* fix: update all migrated whitewhale contracts to code id 641

* chore: update CHANGELOG.md

(cherry picked from commit 505cc98)

Co-authored-by: PaddyMc <[email protected]>
  • Loading branch information
mergify[bot] and PaddyMc authored Apr 5, 2024
1 parent 553f4f2 commit 22544fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit 22544fd

Please sign in to comment.