Skip to content

Commit 0279569

Browse files
helder-moreirak-yang
authored andcommitted
fix(upgrades): add missing 2.2.0 upgrade handler (#2255)
* fix(upgrades): add missing 2.2.0 upgrade handler * add changelog update
1 parent 2252962 commit 0279569

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4747
- [#2241](https://github.com/NibiruChain/nibiru/pull/2241) - fix(evm): evm-tx-index cli fix to exclude most latest block
4848
- [#2236](https://github.com/NibiruChain/nibiru/pull/2236) - chore: make function comment match function name and fix linter errors
4949
- [#2243](https://github.com/NibiruChain/nibiru/pull/2243) - fix(deps): bump Go to v1.24, similar to [#1698](https://github.com/NibiruChain/nibiru/pull/1698)
50+
- [#2250](https://github.com/NibiruChain/nibiru/pull/2250) - fix(upgrades): add missing 2.2.0 upgrade handler
5051

5152
### Dependencies
5253

app/upgrades.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_5_0"
1717
"github.com/NibiruChain/nibiru/v2/app/upgrades/v2_0_0"
1818
"github.com/NibiruChain/nibiru/v2/app/upgrades/v2_1_0"
19+
"github.com/NibiruChain/nibiru/v2/app/upgrades/v2_2_0"
1920
)
2021

2122
var Upgrades = []upgrades.Upgrade{
@@ -29,6 +30,7 @@ var Upgrades = []upgrades.Upgrade{
2930
v1_5_0.Upgrade,
3031
v2_0_0.Upgrade,
3132
v2_1_0.Upgrade,
33+
v2_2_0.Upgrade,
3234
}
3335

3436
func (app *NibiruApp) setupUpgrades() {

app/upgrades/v2_2_0/constants.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package v2_2_0
2+
3+
import (
4+
"github.com/cosmos/cosmos-sdk/store/types"
5+
sdk "github.com/cosmos/cosmos-sdk/types"
6+
"github.com/cosmos/cosmos-sdk/types/module"
7+
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
8+
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"
9+
10+
"github.com/NibiruChain/nibiru/v2/app/upgrades"
11+
)
12+
13+
const UpgradeName = "v2.2.0"
14+
15+
var Upgrade = upgrades.Upgrade{
16+
UpgradeName: UpgradeName,
17+
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler {
18+
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
19+
return mm.RunMigrations(ctx, cfg, fromVM)
20+
}
21+
},
22+
StoreUpgrades: types.StoreUpgrades{},
23+
}

0 commit comments

Comments
 (0)