Skip to content

Commit

Permalink
add upgrade handler for v6_1
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuyenthevinh2000 committed Nov 29, 2023
1 parent cf55a25 commit 1eedad3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/upgrades/v6_1/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package v6_1

Check warning on line 1 in app/upgrades/v6_1/constants.go

View workflow job for this annotation

GitHub Actions / golangci-lint

var-naming: don't use an underscore in package name (revive)

import (
"github.com/classic-terra/core/v2/app/upgrades"
store "github.com/cosmos/cosmos-sdk/store/types"
)

const UpgradeName = "v6_1"

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

Check warning on line 1 in app/upgrades/v6_1/upgrades.go

View workflow job for this annotation

GitHub Actions / golangci-lint

var-naming: don't use an underscore in package name (revive)

import (
"github.com/classic-terra/core/v2/app/keepers"
"github.com/classic-terra/core/v2/app/upgrades"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateV6_1UpgradeHandler(
mm *module.Manager,
cfg module.Configurator,
_ upgrades.BaseAppParamManager,
_ *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
}

0 comments on commit 1eedad3

Please sign in to comment.