Skip to content

Commit

Permalink
fix: upgrade handlers had wrong function type
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Nov 5, 2024
1 parent 45bcbd0 commit 98c3517
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/upgrades/v1_0_1/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
)
Expand All @@ -14,7 +15,7 @@ const UpgradeName = "v1.0.1"
// pretty much a no-op store upgrade to test the upgrade process and include the newer version of rocksdb
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades/v1_0_2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
)
Expand All @@ -14,7 +15,7 @@ const UpgradeName = "v1.0.2"
// a no-op store upgrade to test the upgrade process and include the newer version cosmos-sdk
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades/v1_0_3/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
)
Expand All @@ -14,7 +15,7 @@ const UpgradeName = "v1.0.3"
// a no-op store upgrade to test the upgrade process and include the newer version cosmos-sdk
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades/v1_5_0/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
)
Expand All @@ -13,7 +14,7 @@ const UpgradeName = "v1.5.0"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
Expand Down
3 changes: 2 additions & 1 deletion app/upgrades/v2_0_0/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
evmtypes "github.com/NibiruChain/nibiru/v2/x/evm"
Expand All @@ -14,7 +15,7 @@ const UpgradeName = "v2.0.0"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
Expand Down

0 comments on commit 98c3517

Please sign in to comment.