diff --git a/app/app.go b/app/app.go index 1c5c4792..dafae904 100644 --- a/app/app.go +++ b/app/app.go @@ -92,6 +92,7 @@ import ( "github.com/onomyprotocol/cosmos-gravity-bridge/module/x/gravity" gravitykeeper "github.com/onomyprotocol/cosmos-gravity-bridge/module/x/gravity/keeper" gravitytypes "github.com/onomyprotocol/cosmos-gravity-bridge/module/x/gravity/types" + v1_0_1 "github.com/onomyprotocol/onomy/app/upgrades/v1.0.1" "github.com/onomyprotocol/onomy/docs" "github.com/onomyprotocol/onomy/x/dao" daoclient "github.com/onomyprotocol/onomy/x/dao/client" @@ -324,9 +325,11 @@ func New( // nolint:funlen // app new cosmos func app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp) + app.UpgradeKeeper.SetUpgradeHandler(v1_0_1.Name, v1_0_1.UpgradeHandler) + // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, + appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), &app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, ) // Create Transfer Keepers diff --git a/app/upgrades/readme.md b/app/upgrades/readme.md new file mode 100644 index 00000000..5b9e6ae2 --- /dev/null +++ b/app/upgrades/readme.md @@ -0,0 +1,8 @@ +# Onomy Upgrades + +This folder contains sub-folders for every chain upgrade. + +## Version History + +- v1.0.1 - IBC integration fix + diff --git a/app/upgrades/v1.0.1/upgrade.go b/app/upgrades/v1.0.1/upgrade.go new file mode 100644 index 00000000..6bea2732 --- /dev/null +++ b/app/upgrades/v1.0.1/upgrade.go @@ -0,0 +1,16 @@ +// Package v1_0_1 is contains chain upgrade of the corresponding version. +package v1_0_1 //nolint:revive,stylecheck // app version + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +// Name is migration name. +const Name = "v1.0.1" + +// UpgradeHandler is an x/upgrade handler. +func UpgradeHandler(_ sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + return vm, nil +}