Skip to content

Commit

Permalink
Merge pull request #292 from hypersign-protocol/add-upgrade-handler
Browse files Browse the repository at this point in the history
added upgrade handler for v0.1.1 upgrade
  • Loading branch information
arnabghose997 committed Oct 4, 2022
2 parents 8998974 + 8f45a55 commit 797bcd3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ import (
ibcporttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"

"github.com/spf13/cast"
abci "github.com/tendermint/tendermint/abci/types"
tmjson "github.com/tendermint/tendermint/libs/json"
Expand Down Expand Up @@ -306,6 +306,11 @@ func New(
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("v011", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("v0.0.1 upgrade")
return fromVM, nil
})

// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper = *stakingKeeper.SetHooks(
Expand Down Expand Up @@ -334,14 +339,14 @@ func New(

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec,
keys[ibctransfertypes.StoreKey],
appCodec,
keys[ibctransfertypes.StoreKey],
app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
app.AccountKeeper,
app.BankKeeper,
app.AccountKeeper,
app.BankKeeper,
scopedTransferKeeper,
)
transferModule := transfer.NewAppModule(app.TransferKeeper)
Expand Down
6 changes: 3 additions & 3 deletions x/ssi/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const (
)

const (
DidKey = "Did-value-"
DidCountKey = "Did-count-"
DidKey = "Did-value-"
DidCountKey = "Did-count-"

ChainNamespaceKey = "Did-namespace-"

SchemaKey = "Schema-value-"
Expand Down

0 comments on commit 797bcd3

Please sign in to comment.