From 6fe3964fb2856998bb124b09132a19e01dc62866 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Sun, 28 Jan 2024 10:06:17 +0200 Subject: [PATCH 1/2] fix: icq store --- app/upgrade_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/upgrade_handler.go b/app/upgrade_handler.go index 8686c53e..4c80e67d 100644 --- a/app/upgrade_handler.go +++ b/app/upgrade_handler.go @@ -121,7 +121,7 @@ func (app *TerraApp) RegisterUpgradeStores() { storeUpgrades := storetypes.StoreUpgrades{Added: []string{icqtypes.StoreKey}} app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) } else if upgradeInfo.Name == terraappconfig.Upgrade2_9 && !app.Keepers.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - storeUpgrades := storetypes.StoreUpgrades{Deleted: []string{"builder"}} + storeUpgrades := storetypes.StoreUpgrades{Deleted: []string{"builder"}, Added: []string{icqtypes.StoreKey}} app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) } } From c79f674de27b5a12867dd6cd6c0e5921f587e248 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Sun, 28 Jan 2024 10:17:28 +0200 Subject: [PATCH 2/2] fix: icq store set params --- app/upgrade_handler.go | 1 + app/upgrades/v2.9/upgrade.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/app/upgrade_handler.go b/app/upgrade_handler.go index 4c80e67d..4a8e839f 100644 --- a/app/upgrade_handler.go +++ b/app/upgrade_handler.go @@ -89,6 +89,7 @@ func (app *TerraApp) RegisterUpgradeHandlers() { app.GetModuleManager(), app.GetConfigurator(), app.GetAppCodec(), + app.Keepers.ICQKeeper, ), ) } diff --git a/app/upgrades/v2.9/upgrade.go b/app/upgrades/v2.9/upgrade.go index 370ae121..35b6e38f 100644 --- a/app/upgrades/v2.9/upgrade.go +++ b/app/upgrades/v2.9/upgrade.go @@ -1,6 +1,9 @@ package v2_9 import ( + icqkeeper "github.com/cosmos/ibc-apps/modules/async-icq/v7/keeper" + icqtypes "github.com/cosmos/ibc-apps/modules/async-icq/v7/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -11,8 +14,13 @@ func CreateUpgradeHandler( mm *module.Manager, cfg module.Configurator, cdc codec.Codec, + icqkeeper icqkeeper.Keeper, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // Interchain Queries + icqParams := icqtypes.NewParams(true, nil) + icqkeeper.SetParams(ctx, icqParams) + return mm.RunMigrations(ctx, cfg, fromVM) } }