From 8c78739127f736cd45f38df43e5a343785d86968 Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Thu, 8 Aug 2024 18:37:51 +0800 Subject: [PATCH 1/3] chore: prepare v7.2.0 --- app/upgrades.go | 2 ++ app/upgrades/v720/upgrade.go | 46 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 app/upgrades/v720/upgrade.go diff --git a/app/upgrades.go b/app/upgrades.go index 9dc3efda55..12511f5f78 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -3,10 +3,12 @@ package app import ( v700 "github.com/desmos-labs/desmos/v7/app/upgrades/v700" v710 "github.com/desmos-labs/desmos/v7/app/upgrades/v710" + v720 "github.com/desmos-labs/desmos/v7/app/upgrades/v720" ) // registerUpgradeHandlers registers all the upgrade handlers that are supported by the app func (app *DesmosApp) registerUpgradeHandlers() { app.registerUpgrade(v700.NewUpgrade(app.ModuleManager, app.Configurator())) app.registerUpgrade(v710.NewUpgrade(app.ModuleManager, app.Configurator())) + app.registerUpgrade(v720.NewUpgrade(app.ModuleManager, app.Configurator())) } diff --git a/app/upgrades/v720/upgrade.go b/app/upgrades/v720/upgrade.go new file mode 100644 index 0000000000..3ce1b246f2 --- /dev/null +++ b/app/upgrades/v720/upgrade.go @@ -0,0 +1,46 @@ +package v720 + +import ( + storetypes "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/desmos-labs/desmos/v7/app/upgrades" +) + +var ( + _ upgrades.Upgrade = &Upgrade{} +) + +// Upgrade represents the v7.2.0 upgrade +type Upgrade struct { + mm *module.Manager + configurator module.Configurator +} + +// NewUpgrade returns a new Upgrade instance +func NewUpgrade(mm *module.Manager, configurator module.Configurator) *Upgrade { + return &Upgrade{ + mm: mm, + configurator: configurator, + } +} + +// Name implements upgrades.Upgrade +func (u *Upgrade) Name() string { + return "v7.2.0" +} + +// Handler implements upgrades.Upgrade +func (u *Upgrade) Handler() upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // This upgrade does not require any migration, so we can simply return the current version map + return u.mm.RunMigrations(ctx, u.configurator, fromVM) + } +} + +// StoreUpgrades implements upgrades.Upgrade +func (u *Upgrade) StoreUpgrades() *storetypes.StoreUpgrades { + return &storetypes.StoreUpgrades{} +} From 0250bd54f4c30212e54c1e26e138761e88868b37 Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Thu, 8 Aug 2024 19:10:17 +0800 Subject: [PATCH 2/3] docs: update changelogs --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5d5b09de9..64299a3599 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). --> +## Version 7.1.0 +### Dependencies +- ([\#1323](https://github.com/desmos-labs/desmos/pull/1343)) Bumped `cosmos-sdk` to `v0.47.13` +- ([\#1324](https://github.com/desmos-labs/desmos/pull/1344)) Bumped `wasmvm` to `v1.5.3` + ## Version 7.1.0 ### Dependencies - ([\#1323](https://github.com/desmos-labs/desmos/pull/1323)) Bumped `cosmos-sdk` to `v0.47.10` From 5b0760077422f56c5b0e3d16396550eed28b7773 Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Thu, 8 Aug 2024 20:24:18 +0800 Subject: [PATCH 3/3] docs: fix typos --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64299a3599..55d7e255b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). --> -## Version 7.1.0 +## Version 7.2.0 ### Dependencies - ([\#1323](https://github.com/desmos-labs/desmos/pull/1343)) Bumped `cosmos-sdk` to `v0.47.13` - ([\#1324](https://github.com/desmos-labs/desmos/pull/1344)) Bumped `wasmvm` to `v1.5.3`