Skip to content

Commit

Permalink
chore: prepare v7.2.0 (#1345)
Browse files Browse the repository at this point in the history
## Description

Closes: #XXXX
This PR prepares v7.2.0 including dependencies updates.

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR
Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration
[tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable
and please add
your handle next to the items reviewed if you only reviewed selected
items.*

I have...

- [ ] confirmed the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added support for the v7.2.0 upgrade, enhancing the app's upgrade
capabilities.
- **Documentation**
- Updated the CHANGELOG to reflect new dependency versions and clarify
version bumps.
- **Chores**
- Introduced new upgrade management logic to ensure compatibility with
newer features.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
dadamu authored Aug 8, 2024
1 parent 684d643 commit 0f7fec1
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 2 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}
46 changes: 46 additions & 0 deletions app/upgrades/v720/upgrade.go
Original file line number Diff line number Diff line change
@@ -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{}
}

0 comments on commit 0f7fec1

Please sign in to comment.