Skip to content

Commit

Permalink
feat: v0.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockwarr committed Nov 22, 2024
1 parent 63b45a8 commit be1bcbc
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
"github.com/Nolus-Protocol/nolus-core/app/keepers"
appparams "github.com/Nolus-Protocol/nolus-core/app/params"
"github.com/Nolus-Protocol/nolus-core/app/upgrades"
v068rc "github.com/Nolus-Protocol/nolus-core/app/upgrades/v068-rc"
v068 "github.com/Nolus-Protocol/nolus-core/app/upgrades/v068"
"github.com/Nolus-Protocol/nolus-core/docs"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
Expand All @@ -68,7 +68,7 @@ const (
var (
DefaultNodeHome string

Upgrades = []upgrades.Upgrade{v068rc.Upgrade}
Upgrades = []upgrades.Upgrade{v068.Upgrade}
)

var (
Expand Down
22 changes: 22 additions & 0 deletions app/upgrades/v068/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package v068

import (
store "cosmossdk.io/store/types"
"github.com/Nolus-Protocol/nolus-core/app/upgrades"

icqtypes "github.com/neutron-org/neutron/v4/x/interchainqueries/types"
)

const (
// UpgradeName defines the on-chain upgrades name.
UpgradeName = "v0.6.8"
)

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{},
Deleted: []string{icqtypes.ModuleName},
},
}
33 changes: 33 additions & 0 deletions app/upgrades/v068/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package v068

import (
"context"
"fmt"

"github.com/Nolus-Protocol/nolus-core/app/keepers"

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
keepers *keepers.AppKeepers,
codec codec.Codec,
) upgradetypes.UpgradeHandler {
return func(c context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx := sdk.UnwrapSDKContext(c)

ctx.Logger().Info("Starting module migrations...")
vm, err := mm.RunMigrations(ctx, configurator, vm) //nolint:contextcheck
if err != nil {
return vm, err
}

ctx.Logger().Info(fmt.Sprintf("Migration {%s} applied", UpgradeName))
return vm, nil
}
}

0 comments on commit be1bcbc

Please sign in to comment.