Skip to content

Commit

Permalink
Added v1.10 empty upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Cashmaney committed Aug 13, 2023
1 parent 6085987 commit e144a89
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app

import (
"fmt"
v1_10 "github.com/scrtlabs/SecretNetwork/app/upgrades/v1.10"
"io"
"net/http"
"os"
Expand Down Expand Up @@ -100,6 +101,7 @@ var (
v1_7.Upgrade,
v1_8.Upgrade,
v1_9.Upgrade,
v1_10.Upgrade,
}
)

Expand Down
34 changes: 34 additions & 0 deletions app/upgrades/v1.10/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package v1_10

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.10"

var Upgrade = upgrades.Upgrade{
UpgradeName: upgradeName,
CreateUpgradeHandler: createUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{},
}

func createUpgradeHandler(mm *module.Manager, keepers *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)
}
}

0 comments on commit e144a89

Please sign in to comment.