From aa8b49586e87afb0c3efa61ad495686cc0247ff5 Mon Sep 17 00:00:00 2001
From: Riccardo <riccardo.montagnin@gmail.com>
Date: Tue, 12 Dec 2023 09:38:06 -0500
Subject: [PATCH] chore: release v6.4.0 (#1278)

## Description

This PR prepares the codebase for the next `v6.4.0` release.

<!-- 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...

- [x] 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
- [x] 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
- [x] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [x] included the necessary unit and integration
[tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] 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)
---
 CHANGELOG.md                 |  5 ++++
 app/upgrades.go              |  2 ++
 app/upgrades/v640/upgrade.go | 46 ++++++++++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+)
 create mode 100644 app/upgrades/v640/upgrade.go

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1f09662ef1..1f1862a39d 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 6.4.0
+### Bug Fixes
+#### Profiles
+- ([\#1277](https://github.com/desmos-labs/desmos/pull/1277)) Added missing unpack interfaces function for `LinkChainAccountPacketData` which prevented chain links from being created properly over IBC
+
 ## Version 6.3.1 
 ### Bug fixes
 - Added missing `v6.3.0` upgrade handler
diff --git a/app/upgrades.go b/app/upgrades.go
index ede7895c04..2380db3cd7 100644
--- a/app/upgrades.go
+++ b/app/upgrades.go
@@ -3,10 +3,12 @@ package app
 import (
 	v620 "github.com/desmos-labs/desmos/v6/app/upgrades/v620"
 	v630 "github.com/desmos-labs/desmos/v6/app/upgrades/v630"
+	v640 "github.com/desmos-labs/desmos/v6/app/upgrades/v640"
 )
 
 // registerUpgradeHandlers registers all the upgrade handlers that are supported by the app
 func (app *DesmosApp) registerUpgradeHandlers() {
 	app.registerUpgrade(v620.NewUpgrade(app.ModuleManager, app.Configurator()))
 	app.registerUpgrade(v630.NewUpgrade(app.ModuleManager, app.Configurator()))
+	app.registerUpgrade(v640.NewUpgrade(app.ModuleManager, app.Configurator()))
 }
diff --git a/app/upgrades/v640/upgrade.go b/app/upgrades/v640/upgrade.go
new file mode 100644
index 0000000000..238617cd65
--- /dev/null
+++ b/app/upgrades/v640/upgrade.go
@@ -0,0 +1,46 @@
+package v640
+
+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/v6/app/upgrades"
+)
+
+var (
+	_ upgrades.Upgrade = &Upgrade{}
+)
+
+// Upgrade represents the v6.4.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 "v6.4.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{}
+}