Skip to content

Commit

Permalink
Prepare v1.0.1 upgrade with IBC integration fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitryhil committed Dec 11, 2022
1 parent d0c4962 commit dc8dab8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ import (
"github.com/onomyprotocol/cosmos-gravity-bridge/module/x/gravity"
gravitykeeper "github.com/onomyprotocol/cosmos-gravity-bridge/module/x/gravity/keeper"
gravitytypes "github.com/onomyprotocol/cosmos-gravity-bridge/module/x/gravity/types"
v1_0_1 "github.com/onomyprotocol/onomy/app/upgrades/v1.0.1"
"github.com/onomyprotocol/onomy/docs"
"github.com/onomyprotocol/onomy/x/dao"
daoclient "github.com/onomyprotocol/onomy/x/dao/client"
Expand Down Expand Up @@ -324,9 +325,11 @@ func New( // nolint:funlen // app new cosmos func
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper)
app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp)

app.UpgradeKeeper.SetUpgradeHandler(v1_0_1.Name, v1_0_1.UpgradeHandler)

// Create IBC Keeper
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), &app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
)

// Create Transfer Keepers
Expand Down
8 changes: 8 additions & 0 deletions app/upgrades/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Onomy Upgrades

This folder contains sub-folders for every chain upgrade.

## Version History

- v1.0.1 - IBC integration fix

16 changes: 16 additions & 0 deletions app/upgrades/v1.0.1/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Package v1_0_1 is contains chain upgrade of the corresponding version.
package v1_0_1 //nolint:revive,stylecheck // app version

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

// Name is migration name.
const Name = "v1.0.1"

// UpgradeHandler is an x/upgrade handler.
func UpgradeHandler(_ sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
return vm, nil
}

0 comments on commit dc8dab8

Please sign in to comment.