Skip to content

Commit

Permalink
add testnet upgrade file
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronKutch committed Oct 4, 2023
1 parent 816cb56 commit 043addd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
15 changes: 15 additions & 0 deletions app/consumer-democracy/upgrades/v1.0.1-onex-testnet/upgrade.go
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 043addd

Please sign in to comment.