-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
418feb9
commit 13cd4c2
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package v1_14 | ||
|
||
import ( | ||
"fmt" | ||
|
||
store "github.com/cosmos/cosmos-sdk/store/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
"github.com/scrtlabs/SecretNetwork/app/keepers" | ||
"github.com/scrtlabs/SecretNetwork/app/upgrades" | ||
) | ||
|
||
const upgradeName = "v1.14" | ||
|
||
var Upgrade = upgrades.Upgrade{ | ||
UpgradeName: upgradeName, | ||
CreateUpgradeHandler: createUpgradeHandler, | ||
StoreUpgrades: store.StoreUpgrades{}, | ||
} | ||
|
||
func createUpgradeHandler(mm *module.Manager, _ *keepers.SecretAppKeepers, configurator module.Configurator, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
ctx.Logger().Info(` _ _ _____ _____ _____ _____ ______ `) | ||
ctx.Logger().Info(`| | | | __ \ / ____| __ \ /\ | __ \| ____|`) | ||
ctx.Logger().Info(`| | | | |__) | | __| |__) | / \ | | | | |__ `) | ||
ctx.Logger().Info(`| | | | ___/| | |_ | _ / / /\ \ | | | | __| `) | ||
ctx.Logger().Info(`| |__| | | | |__| | | \ \ / ____ \| |__| | |____ `) | ||
ctx.Logger().Info(` \____/|_| \_____|_| \_\/_/ \_\_____/|______|`) | ||
|
||
ctx.Logger().Info(fmt.Sprintf("Running module migrations for %s...", upgradeName)) | ||
|
||
return mm.RunMigrations(ctx, configurator, vm) | ||
} | ||
} |