diff --git a/app/upgrades.go b/app/upgrades.go index e568fdfd7..68b195e0b 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -2,6 +2,7 @@ package app import ( "fmt" + "github.com/NibiruChain/nibiru/app/upgrades/v1_0_3" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" @@ -13,6 +14,7 @@ import ( var Upgrades = []upgrades.Upgrade{ v1_0_1.Upgrade, v1_0_2.Upgrade, + v1_0_3.Upgrade, } func (app *NibiruApp) setupUpgrades() { diff --git a/app/upgrades/v1_0_3/constants.go b/app/upgrades/v1_0_3/constants.go new file mode 100644 index 000000000..3ec54ae30 --- /dev/null +++ b/app/upgrades/v1_0_3/constants.go @@ -0,0 +1,23 @@ +package v1_0_3 + +import ( + "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/NibiruChain/nibiru/app/upgrades" +) + +const UpgradeName = "v1.0.3" + +// a no-op store upgrade to test the upgrade process and include the newer version cosmos-sdk +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return mm.RunMigrations(ctx, cfg, fromVM) + } + }, + StoreUpgrades: types.StoreUpgrades{}, +}