From 6fe3964fb2856998bb124b09132a19e01dc62866 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Sun, 28 Jan 2024 10:06:17 +0200 Subject: [PATCH 1/3] 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/3] 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) } } From 67ec5fabf4bc628b36bc02c8f27cffc69f97784a Mon Sep 17 00:00:00 2001 From: emidev98 Date: Wed, 6 Mar 2024 16:45:50 +0200 Subject: [PATCH 3/3] fix: upgrade handler --- app/upgrade_handler.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/upgrade_handler.go b/app/upgrade_handler.go index 3c426de6..b045ae27 100644 --- a/app/upgrade_handler.go +++ b/app/upgrade_handler.go @@ -6,6 +6,7 @@ import ( ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" alliancetypes "github.com/terra-money/alliance/x/alliance/types" terraappconfig "github.com/terra-money/core/v2/app/config" + v2_10 "github.com/terra-money/core/v2/app/upgrades/v2.10" v2_2_0 "github.com/terra-money/core/v2/app/upgrades/v2.2.0" v2_3_0 "github.com/terra-money/core/v2/app/upgrades/v2.3.0" v2_4 "github.com/terra-money/core/v2/app/upgrades/v2.4" @@ -93,7 +94,7 @@ func (app *TerraApp) RegisterUpgradeHandlers() { ) app.Keepers.UpgradeKeeper.SetUpgradeHandler( terraappconfig.Upgrade2_10, - v2_9.CreateUpgradeHandler( + v2_10.CreateUpgradeHandler( app.GetModuleManager(), app.GetConfigurator(), app.GetAppCodec(), @@ -131,5 +132,8 @@ func (app *TerraApp) RegisterUpgradeStores() { } else if upgradeInfo.Name == terraappconfig.Upgrade2_9 && !app.Keepers.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { storeUpgrades := storetypes.StoreUpgrades{Deleted: []string{"builder"}} app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) + } else if upgradeInfo.Name == terraappconfig.Upgrade2_10 && !app.Keepers.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { + storeUpgrades := storetypes.StoreUpgrades{} + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) } }