Skip to content

Commit

Permalink
Merge pull request #498 from neutron-org/feat/v3.0.5-upgrade-handler
Browse files Browse the repository at this point in the history
added v3.0.5 upgrade hander
  • Loading branch information
pr0n00gler authored Apr 23, 2024
2 parents c62beaf + 90f4fc4 commit 73f419c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"path/filepath"
"reflect"

v305 "github.com/neutron-org/neutron/v3/app/upgrades/v3.0.5"

"github.com/cosmos/cosmos-sdk/testutil/sims"
globalfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward"
Expand Down Expand Up @@ -185,7 +187,7 @@ const (
)

var (
Upgrades = []upgrades.Upgrade{v030.Upgrade, v044.Upgrade, v200.Upgrade, v202.Upgrade, v301.Upgrade, v304.Upgrade}
Upgrades = []upgrades.Upgrade{v030.Upgrade, v044.Upgrade, v200.Upgrade, v202.Upgrade, v301.Upgrade, v304.Upgrade, v305.Upgrade}

// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
Expand Down
15 changes: 15 additions & 0 deletions app/upgrades/v3.0.5/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package v305

import (
"github.com/neutron-org/neutron/v3/app/upgrades"
)

const (
// UpgradeName defines the on-chain upgrade name.
UpgradeName = "v3.0.5"
)

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

import (
"fmt"

"github.com/cosmos/cosmos-sdk/codec"
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/neutron-org/neutron/v3/app/upgrades"
)

func CreateUpgradeHandler(
_ *module.Manager,
_ module.Configurator,
_ *upgrades.UpgradeKeepers,
_ upgrades.StoreKeys,
_ codec.Codec,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info(fmt.Sprintf("Empty migration {%s} applied", UpgradeName))
return vm, nil
}
}

0 comments on commit 73f419c

Please sign in to comment.