Skip to content

Commit

Permalink
add 5.4 upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
dpdanpittman committed Jan 11, 2024
1 parent 65fb180 commit 53a116e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/upgrades/v5_4/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package v5_4

import (
"github.com/cosmic-horizon/qwoyn/app/upgrades"
)

const (
// UpgradeName defines the on-chain upgrade name.
UpgradeName = "v5.4.0"
)

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
}
18 changes: 18 additions & 0 deletions app/upgrades/v5_4/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package v5_4

import (
"github.com/cosmic-horizon/qwoyn/app/keepers"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
keepers keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, configurator, vm)
}
}

0 comments on commit 53a116e

Please sign in to comment.