Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Merge pull request #125 from BitCannaGlobal/v0.46.7-update
Browse files Browse the repository at this point in the history
Chore: bump SDK v0.46.7 & IBC-go v6
  • Loading branch information
BitCanna authored Dec 16, 2022
2 parents be1518d + 6a2c32f commit 9d7d579
Show file tree
Hide file tree
Showing 4 changed files with 1,197 additions and 553 deletions.
47 changes: 26 additions & 21 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts"
icacontrollerkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper"
icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"
"github.com/cosmos/ibc-go/v5/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v5/modules/core"
ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client"
ibcclientclient "github.com/cosmos/ibc-go/v5/modules/core/02-client/client"
ibcclienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"
ibcporttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper"
ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts"
icacontrollerkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/keeper"
icacontrollertypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"
"github.com/cosmos/ibc-go/v6/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v6/modules/core"
ibcclient "github.com/cosmos/ibc-go/v6/modules/core/02-client"
ibcclientclient "github.com/cosmos/ibc-go/v6/modules/core/02-client/client"
ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
ibcporttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
"github.com/spf13/cast"

abci "github.com/tendermint/tendermint/abci/types"
Expand All @@ -115,6 +115,8 @@ import (
bcnamodule "github.com/BitCannaGlobal/bcna/x/bcna"
bcnamodulekeeper "github.com/BitCannaGlobal/bcna/x/bcna/keeper"
bcnamoduletypes "github.com/BitCannaGlobal/bcna/x/bcna/types"

v046mig "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046"
)

const (
Expand Down Expand Up @@ -487,7 +489,7 @@ func New(
app.ICAHostKeeper = icahostkeeper.NewKeeper(
appCodec, keys[icahosttypes.StoreKey],
app.GetSubspace(icahosttypes.SubModuleName),
app.IBCKeeper.ChannelKeeper, //ics4Wrapper: https://github.com/cosmos/ibc-go/blob/v5.0.0/modules/apps/27-interchain-accounts/host/keeper/keeper.go#L57
app.IBCKeeper.ChannelKeeper, //ics4Wrapper: https://github.com/cosmos/ibc-go/blob/v6.0.0/modules/apps/27-interchain-accounts/host/keeper/keeper.go#L57
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
app.AccountKeeper,
Expand Down Expand Up @@ -868,10 +870,13 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) {
)
}
func (app *App) RegisterUpgradeHandlersDevNet() {
planName := "wakeandbake46.6"
planName := "wakeandbake46.7"
app.UpgradeKeeper.SetUpgradeHandler(planName, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("start to run module migrations...")

ctx.Logger().Info("start to run store migrations...")
err := v046mig.Migrate_V046_6_To_V046_7(ctx.KVStore(app.keys["gov"]), app.appCodec)
if err != nil {
return fromVM, err
}
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

Expand Down
Loading

0 comments on commit 9d7d579

Please sign in to comment.