Skip to content

chore: deprecate nft for future #24575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

### Deprecated

* (x/nft) [#24575](https://github.com/cosmos/cosmos-sdk/pull/24575) Deprecate the `x/nft` module in the Cosmos SDK repository. This module will not be maintained to the extent that our core modules will and will be kept in a [legacy repo](https://github.com/cosmos/cosmos-legacy).

## [Unreleased]

### Features
Expand Down
6 changes: 3 additions & 3 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"cosmossdk.io/x/feegrant"
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
feegrantmodule "cosmossdk.io/x/feegrant/module"
"cosmossdk.io/x/nft"
nftkeeper "cosmossdk.io/x/nft/keeper"
nftmodule "cosmossdk.io/x/nft/module"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
nftkeeper "cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
nftmodule "cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/tx/signing"
"cosmossdk.io/x/upgrade"
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
Expand Down
4 changes: 2 additions & 2 deletions simapp/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
"cosmossdk.io/x/feegrant"
_ "cosmossdk.io/x/feegrant/module" // import for side-effects
"cosmossdk.io/x/nft"
_ "cosmossdk.io/x/nft/module" // import for side-effects
_ "cosmossdk.io/x/upgrade" // import for side-effects
_ "cosmossdk.io/x/nft/module"
_ "cosmossdk.io/x/upgrade" // import for side-effects
upgradetypes "cosmossdk.io/x/upgrade/types"

"github.com/cosmos/cosmos-sdk/runtime"
Expand Down
2 changes: 1 addition & 1 deletion x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ capabilities of your blockchain or further specialize it.
* [Epochs](./epochs/README.md) - Registration so SDK modules can have logic to be executed at the timed tickers.
* [Feegrant](./feegrant/README.md) - Grant fee allowances for executing transactions.
* [Group](./group/README.md) - Allows for the creation and management of on-chain multisig accounts.
* [NFT](./nft/README.md) - NFT module implemented based on [ADR43](https://docs.cosmos.network/main/architecture/adr-043-nft-module.html).
* [ProtocolPool](./protocolpool/README.md) - Extended management of community pool functionality.

## Deprecated Modules
Expand All @@ -45,6 +44,7 @@ in an upcoming release of the Cosmos SDK per our [release process](https://githu

* [Crisis](./crisis/README.md) - *Deprecated* halting the blockchain under certain circumstances (e.g. if an invariant is broken).
* [Params](./params/README.md) - *Deprecated* Globally available parameter store.
* [NFT](./nft/README.md) - *Deprecated* NFT module implemented based on [ADR43](https://docs.cosmos.network/main/architecture/adr-043-nft-module.html). This module will be moved to the `cosmos-sdk-legacy` repo for use.

To learn more about the process of building modules, visit the [building modules reference documentation](https://docs.cosmos.network/main/building-modules/intro).

Expand Down
2 changes: 2 additions & 0 deletions x/nft/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ sidebar_position: 1

# `x/nft`

⚠️ **DEPRECATED**: This package is deprecated and will be removed in the next major release. The `x/nft` module will be moved to a separate repo `github.com/cosmos/cosmos-sdk-legacy`.

## Contents

## Abstract
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/class.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"cosmossdk.io/errors"
storetypes "cosmossdk.io/store/types"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/runtime"
)
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper
import (
"sort"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"cosmossdk.io/store/prefix"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/runtime"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/codec/address"
)
Expand Down
3 changes: 2 additions & 1 deletion x/nft/keeper/keeper.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Deprecated: This package is deprecated and will be removed in the next major release. The `x/nft` module will be moved to a separate repo `github.com/cosmos/cosmos-sdk-legacy`.
package keeper

import (
"cosmossdk.io/core/address"
store "cosmossdk.io/core/store"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/codec"
)
Expand Down
6 changes: 3 additions & 3 deletions x/nft/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"go.uber.org/mock/gomock"

storetypes "cosmossdk.io/store/types"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft/keeper"
"cosmossdk.io/x/nft/module"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
nfttestutil "cosmossdk.io/x/nft/testutil"

"github.com/cosmos/cosmos-sdk/baseapp"
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper
import (
"bytes"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/internal/conv"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"

errorsmod "cosmossdk.io/errors"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper_test
import (
"fmt"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
)

var (
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/nft.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"cosmossdk.io/errors"
"cosmossdk.io/store/prefix"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/runtime"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/nft_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"cosmossdk.io/errors"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/nft_batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math/rand"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
)

func (s *TestSuite) TestBatchMint() {
Expand Down
1 change: 1 addition & 0 deletions x/nft/keys.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Deprecated: This package is deprecated and will be removed in the next major release. The `x/nft` module will be moved to a separate repo `github.com/cosmos/cosmos-sdk-legacy`.
package nft

const (
Expand Down
3 changes: 2 additions & 1 deletion x/nft/module/autocli.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Deprecated: This package is deprecated and will be removed in the next major release. The `x/nft` module will be moved to a separate repo `github.com/cosmos/cosmos-sdk-legacy`.
package module

import (
"fmt"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
nftv1beta1 "cosmossdk.io/api/cosmos/nft/v1beta1"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/version"
)
Expand Down
6 changes: 3 additions & 3 deletions x/nft/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"cosmossdk.io/core/store"
"cosmossdk.io/depinject"
"cosmossdk.io/errors"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft/keeper"
"cosmossdk.io/x/nft/simulation"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed

sdkclient "github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down
5 changes: 3 additions & 2 deletions x/nft/simulation/decoder.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Deprecated: This package is deprecated and will be removed in the next major release. The `x/nft` module will be moved to a separate repo `github.com/cosmos/cosmos-sdk-legacy`.
package simulation

import (
"bytes"
"fmt"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft/keeper"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
8 changes: 4 additions & 4 deletions x/nft/simulation/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/stretchr/testify/require"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft/keeper"
"cosmossdk.io/x/nft/module"
"cosmossdk.io/x/nft/simulation"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion x/nft/simulation/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/rand"

"cosmossdk.io/core/address"
"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
Expand Down
6 changes: 3 additions & 3 deletions x/nft/simulation/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/stretchr/testify/require"

sdkmath "cosmossdk.io/math"
"cosmossdk.io/x/nft"
nftmodule "cosmossdk.io/x/nft/module"
"cosmossdk.io/x/nft/simulation"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
nftmodule "cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed

addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
"github.com/cosmos/cosmos-sdk/types/module"
Expand Down
4 changes: 2 additions & 2 deletions x/nft/simulation/msg_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package simulation
import (
"context"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft/keeper"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/testutil/simsx"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
4 changes: 2 additions & 2 deletions x/nft/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package simulation
import (
"math/rand"

"cosmossdk.io/x/nft"
"cosmossdk.io/x/nft/keeper"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
Expand Down
6 changes: 3 additions & 3 deletions x/nft/simulation/operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"cosmossdk.io/depinject"
"cosmossdk.io/log"
"cosmossdk.io/x/nft"
nftkeeper "cosmossdk.io/x/nft/keeper"
"cosmossdk.io/x/nft/simulation"
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
nftkeeper "cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed
"cosmossdk.io/x/nft/testutil"

"github.com/cosmos/cosmos-sdk/client"
Expand Down
2 changes: 1 addition & 1 deletion x/nft/testutil/app_config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package testutil

import (
_ "cosmossdk.io/x/nft/module" // import as blank for app wiring
_ "cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed // import as blank for app wiring

"github.com/cosmos/cosmos-sdk/testutil/configurator"
_ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring
Expand Down
Loading