Skip to content

Commit

Permalink
remove the nft store key
Browse files Browse the repository at this point in the history
  • Loading branch information
miladz68 committed Oct 10, 2023
1 parent 87e4b2c commit bd5b976
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func New(
authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey, crisistypes.StoreKey, minttypes.StoreKey,
distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, upgradetypes.StoreKey,
feegrant.StoreKey, evidencetypes.StoreKey, capabilitytypes.StoreKey, consensusparamtypes.StoreKey, wasmtypes.StoreKey, feemodeltypes.StoreKey,
assetfttypes.StoreKey, assetnfttypes.StoreKey, cnftkeeper.StoreKey, ibcexported.StoreKey, ibctransfertypes.StoreKey,
assetfttypes.StoreKey, assetnfttypes.StoreKey, nftkeeper.StoreKey, ibcexported.StoreKey, ibctransfertypes.StoreKey,
delaytypes.StoreKey, customparamstypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, feemodeltypes.TransientStoreKey)
Expand Down Expand Up @@ -494,7 +494,7 @@ func New(
app.IBCKeeper = ibckeeper.NewKeeper(appCodec, keys[ibcexported.StoreKey], app.GetSubspace(ibcexported.ModuleName),
app.StakingKeeper, app.UpgradeKeeper, app.ScopedIBCKeeper)

nftKeeper := nftkeeper.NewKeeper(keys[cnftkeeper.StoreKey], appCodec, app.AccountKeeper, app.BankKeeper)
nftKeeper := nftkeeper.NewKeeper(keys[nftkeeper.StoreKey], appCodec, app.AccountKeeper, app.BankKeeper)
app.AssetNFTKeeper = assetnftkeeper.NewKeeper(
appCodec,
keys[assetnfttypes.StoreKey],
Expand Down
8 changes: 8 additions & 0 deletions app/upgrade/v3/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
Expand All @@ -36,6 +37,7 @@ import (
assetnfttypes "github.com/CoreumFoundation/coreum/v3/x/asset/nft/types"
customparamstypes "github.com/CoreumFoundation/coreum/v3/x/customparams/types"
feemodeltypes "github.com/CoreumFoundation/coreum/v3/x/feemodel/types"
cnftkeeper "github.com/CoreumFoundation/coreum/v3/x/nft/keeper"
)

// References:
Expand Down Expand Up @@ -70,6 +72,12 @@ func New(
consensustypes.StoreKey,
customparamstypes.StoreKey,
},
Renamed: []storetypes.StoreRename{
{
OldKey: cnftkeeper.StoreKey,
NewKey: nftkeeper.StoreKey,
},
},
},
Upgrade: func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger().With("upgrade", Name)
Expand Down

0 comments on commit bd5b976

Please sign in to comment.