From 043adddc21fbd1b14a723da293338f4a3ca0cdf2 Mon Sep 17 00:00:00 2001 From: Aaron Kutch Date: Wed, 4 Oct 2023 18:25:28 -0500 Subject: [PATCH] add testnet upgrade file --- app/consumer-democracy/app.go | 4 ++-- .../upgrades/v1.0.1-onex-testnet/upgrade.go | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 app/consumer-democracy/upgrades/v1.0.1-onex-testnet/upgrade.go diff --git a/app/consumer-democracy/app.go b/app/consumer-democracy/app.go index 0aeead8..39694dc 100644 --- a/app/consumer-democracy/app.go +++ b/app/consumer-democracy/app.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - // v0 "github.com/onomyprotocol/multiverse/app/consumer-democracy/upgrades/" + v1_0_1_onex_testnet "github.com/onomyprotocol/multiverse/app/consumer-democracy/upgrades/v1.0.1-onex-testnet" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -916,7 +916,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino } func (app *App) setupUpgradeHandlers() { - // app.UpgradeKeeper.SetUpgradeHandler(v0.Name, v0.UpgradeHandler) + app.UpgradeKeeper.SetUpgradeHandler(v1_0_1_onex_testnet.Name, v1_0_1_onex_testnet.UpgradeHandler) upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() if err != nil { diff --git a/app/consumer-democracy/upgrades/v1.0.1-onex-testnet/upgrade.go b/app/consumer-democracy/upgrades/v1.0.1-onex-testnet/upgrade.go new file mode 100644 index 0000000..6823fb9 --- /dev/null +++ b/app/consumer-democracy/upgrades/v1.0.1-onex-testnet/upgrade.go @@ -0,0 +1,15 @@ +package v1_0_1_onex_testnet //nolint:revive,stylecheck // app version + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +// Name is migration name. +const Name = "v1.0.1-onex-testnet" + +// UpgradeHandler is an x/upgrade handler. +func UpgradeHandler(_ sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + return vm, nil +}