Skip to content

Commit

Permalink
chore: prepare upgrade handler and bump app version
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurist-85 authored and kioqq committed Oct 17, 2024
1 parent f72a345 commit dfda1a3
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DIFF_TAG=$(shell git rev-list --tags="v*" --max-count=1 --not $(shell git rev-li
DEFAULT_TAG=$(shell git rev-list --tags="v*" --max-count=1)
# VERSION ?= $(shell echo $(shell git describe --tags $(or $(DIFF_TAG), $(DEFAULT_TAG))) | sed 's/^v//')

VERSION := "1.8.1"
VERSION := "1.8.2"
CBFTVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')
COMMIT := $(shell git log -1 --format='%H')
LEDGER_ENABLED ?= true
Expand Down
7 changes: 7 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ import (
v178 "github.com/haqq-network/haqq/app/upgrades/v1.7.8"
v180 "github.com/haqq-network/haqq/app/upgrades/v1.8.0"
v181 "github.com/haqq-network/haqq/app/upgrades/v1.8.1"
v182 "github.com/haqq-network/haqq/app/upgrades/v1.8.2"

// NOTE: override ICS20 keeper to support IBC transfers of ERC20 tokens
"github.com/haqq-network/haqq/x/ibc/transfer"
Expand Down Expand Up @@ -1288,6 +1289,12 @@ func (app *Haqq) setupUpgradeHandlers(keys map[string]*storetypes.KVStoreKey) {
v181.CreateUpgradeHandler(app.mm, app.configurator, app.AccountKeeper, *app.StakingKeeper.Keeper),
)

// v1.8.2 Add partial transfer ownership in UC DAO module, improve integration tests and fix IBC Forwarding
app.UpgradeKeeper.SetUpgradeHandler(
v182.UpgradeName,
v182.CreateUpgradeHandler(app.mm, app.configurator),
)

// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
// This will read that value, and execute the preparations for the upgrade.
Expand Down
6 changes: 6 additions & 0 deletions app/upgrades/v1.8.2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package v182

const (
// UpgradeName is the shared upgrade plan name for mainnet
UpgradeName = "v1.8.2"
)
20 changes: 20 additions & 0 deletions app/upgrades/v1.8.2/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package v182

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

// CreateUpgradeHandler creates an SDK upgrade handler for v1.8.2
func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger()
logger.Info("run migration v1.8.2")

return mm.RunMigrations(ctx, configurator, vm)
}
}

0 comments on commit dfda1a3

Please sign in to comment.