From 98c3517f1699f710ca97417990edb7362f941c89 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:26:50 -0800 Subject: [PATCH] fix: upgrade handlers had wrong function type --- app/upgrades/v1_0_1/constants.go | 3 ++- app/upgrades/v1_0_2/constants.go | 3 ++- app/upgrades/v1_0_3/constants.go | 3 ++- app/upgrades/v1_5_0/constants.go | 3 ++- app/upgrades/v2_0_0/constants.go | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/upgrades/v1_0_1/constants.go b/app/upgrades/v1_0_1/constants.go index 1548161da..16ba7d6ff 100644 --- a/app/upgrades/v1_0_1/constants.go +++ b/app/upgrades/v1_0_1/constants.go @@ -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" ) @@ -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) } diff --git a/app/upgrades/v1_0_2/constants.go b/app/upgrades/v1_0_2/constants.go index 5333497fc..e27784241 100644 --- a/app/upgrades/v1_0_2/constants.go +++ b/app/upgrades/v1_0_2/constants.go @@ -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" ) @@ -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) } diff --git a/app/upgrades/v1_0_3/constants.go b/app/upgrades/v1_0_3/constants.go index acec556b6..96b2e9606 100644 --- a/app/upgrades/v1_0_3/constants.go +++ b/app/upgrades/v1_0_3/constants.go @@ -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" ) @@ -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) } diff --git a/app/upgrades/v1_5_0/constants.go b/app/upgrades/v1_5_0/constants.go index 71e4aa827..fb15d6809 100644 --- a/app/upgrades/v1_5_0/constants.go +++ b/app/upgrades/v1_5_0/constants.go @@ -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" ) @@ -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) } diff --git a/app/upgrades/v2_0_0/constants.go b/app/upgrades/v2_0_0/constants.go index cc4c5eaf2..c5a223948 100644 --- a/app/upgrades/v2_0_0/constants.go +++ b/app/upgrades/v2_0_0/constants.go @@ -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" @@ -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) }