Skip to content

Commit 9168ce4

Browse files
authored
chore: deprecate nft for future (#24575)
1 parent 4fd207c commit 9168ce4

28 files changed

+52
-42
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
3636

3737
# Changelog
3838

39+
### Deprecated
40+
41+
* (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).
42+
3943
## [Unreleased]
4044

4145
### Deprecated

simapp/app.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ import (
2929
"cosmossdk.io/x/feegrant"
3030
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
3131
feegrantmodule "cosmossdk.io/x/feegrant/module"
32-
"cosmossdk.io/x/nft"
33-
nftkeeper "cosmossdk.io/x/nft/keeper"
34-
nftmodule "cosmossdk.io/x/nft/module"
32+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
33+
nftkeeper "cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
34+
nftmodule "cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
3535
"cosmossdk.io/x/tx/signing"
3636
"cosmossdk.io/x/upgrade"
3737
upgradekeeper "cosmossdk.io/x/upgrade/keeper"

simapp/app_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import (
3636
"cosmossdk.io/x/feegrant"
3737
_ "cosmossdk.io/x/feegrant/module" // import for side-effects
3838
"cosmossdk.io/x/nft"
39-
_ "cosmossdk.io/x/nft/module" // import for side-effects
40-
_ "cosmossdk.io/x/upgrade" // import for side-effects
39+
_ "cosmossdk.io/x/nft/module"
40+
_ "cosmossdk.io/x/upgrade" // import for side-effects
4141
upgradetypes "cosmossdk.io/x/upgrade/types"
4242

4343
"github.com/cosmos/cosmos-sdk/runtime"

x/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ capabilities of your blockchain or further specialize it.
3434
* [Authz](./authz/README.md) - Authorization for accounts to perform actions on behalf of other accounts.
3535
* [Epochs](./epochs/README.md) - Registration so SDK modules can have logic to be executed at the timed tickers.
3636
* [Feegrant](./feegrant/README.md) - Grant fee allowances for executing transactions.
37-
* [NFT](./nft/README.md) - NFT module implemented based on [ADR43](https://docs.cosmos.network/main/architecture/adr-043-nft-module.html).
3837
* [ProtocolPool](./protocolpool/README.md) - Extended management of community pool functionality.
3938

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

4544
* [Crisis](./crisis/README.md) - *Deprecated* halting the blockchain under certain circumstances (e.g. if an invariant is broken).
4645
* [Params](./params/README.md) - *Deprecated* Globally available parameter store.
46+
* [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.
4747
* [Group](./group/README.md) - *Deprecated* Allows for the creation and management of on-chain multisig accounts. This module will be moved to the `cosmos-sdk-legacy` repo for legacy use.
4848

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

x/nft/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar_position: 1
44

55
# `x/nft`
66

7+
⚠️ **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`.
8+
79
## Contents
810

911
## Abstract

x/nft/keeper/class.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"cosmossdk.io/errors"
77
storetypes "cosmossdk.io/store/types"
8-
"cosmossdk.io/x/nft"
8+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
99

1010
"github.com/cosmos/cosmos-sdk/runtime"
1111
)

x/nft/keeper/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package keeper
33
import (
44
"sort"
55

6-
"cosmossdk.io/x/nft"
6+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
77

88
sdk "github.com/cosmos/cosmos-sdk/types"
99
)

x/nft/keeper/grpc_query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55

66
"cosmossdk.io/store/prefix"
7-
"cosmossdk.io/x/nft"
7+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
88

99
"github.com/cosmos/cosmos-sdk/runtime"
1010
sdk "github.com/cosmos/cosmos-sdk/types"

x/nft/keeper/grpc_query_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/stretchr/testify/require"
99
"github.com/stretchr/testify/suite"
1010

11-
"cosmossdk.io/x/nft"
11+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
1212

1313
"github.com/cosmos/cosmos-sdk/codec/address"
1414
)

x/nft/keeper/keeper.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
// 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`.
12
package keeper
23

34
import (
45
"cosmossdk.io/core/address"
56
store "cosmossdk.io/core/store"
6-
"cosmossdk.io/x/nft"
7+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
78

89
"github.com/cosmos/cosmos-sdk/codec"
910
)

x/nft/keeper/keeper_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"go.uber.org/mock/gomock"
1010

1111
storetypes "cosmossdk.io/store/types"
12-
"cosmossdk.io/x/nft"
13-
"cosmossdk.io/x/nft/keeper"
14-
"cosmossdk.io/x/nft/module"
12+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
13+
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
14+
"cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
1515
nfttestutil "cosmossdk.io/x/nft/testutil"
1616

1717
"github.com/cosmos/cosmos-sdk/baseapp"

x/nft/keeper/keys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package keeper
33
import (
44
"bytes"
55

6-
"cosmossdk.io/x/nft"
6+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
77
"cosmossdk.io/x/nft/internal/conv"
88

99
sdk "github.com/cosmos/cosmos-sdk/types"

x/nft/keeper/msg_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"context"
66

77
errorsmod "cosmossdk.io/errors"
8-
"cosmossdk.io/x/nft"
8+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
99

1010
sdk "github.com/cosmos/cosmos-sdk/types"
1111
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

x/nft/keeper/msg_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package keeper_test
33
import (
44
"fmt"
55

6-
"cosmossdk.io/x/nft"
6+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
77
)
88

99
var (

x/nft/keeper/nft.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"cosmossdk.io/errors"
77
"cosmossdk.io/store/prefix"
8-
"cosmossdk.io/x/nft"
8+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
99

1010
"github.com/cosmos/cosmos-sdk/runtime"
1111
sdk "github.com/cosmos/cosmos-sdk/types"

x/nft/keeper/nft_batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55

66
"cosmossdk.io/errors"
7-
"cosmossdk.io/x/nft"
7+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
88

99
sdk "github.com/cosmos/cosmos-sdk/types"
1010
)

x/nft/keeper/nft_batch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"math/rand"
66

7-
"cosmossdk.io/x/nft"
7+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
88
)
99

1010
func (s *TestSuite) TestBatchMint() {

x/nft/keys.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// 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`.
12
package nft
23

34
const (

x/nft/module/autocli.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
// 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`.
12
package module
23

34
import (
45
"fmt"
56

67
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
78
nftv1beta1 "cosmossdk.io/api/cosmos/nft/v1beta1"
8-
"cosmossdk.io/x/nft"
9+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
910

1011
"github.com/cosmos/cosmos-sdk/version"
1112
)

x/nft/module/module.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
"cosmossdk.io/core/store"
1414
"cosmossdk.io/depinject"
1515
"cosmossdk.io/errors"
16-
"cosmossdk.io/x/nft"
17-
"cosmossdk.io/x/nft/keeper"
18-
"cosmossdk.io/x/nft/simulation"
16+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
17+
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
18+
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed
1919

2020
sdkclient "github.com/cosmos/cosmos-sdk/client"
2121
"github.com/cosmos/cosmos-sdk/codec"

x/nft/simulation/decoder.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
// 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`.
12
package simulation
23

34
import (
45
"bytes"
56
"fmt"
67

7-
"cosmossdk.io/x/nft"
8-
"cosmossdk.io/x/nft/keeper"
8+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
9+
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
910

1011
"github.com/cosmos/cosmos-sdk/codec"
1112
sdk "github.com/cosmos/cosmos-sdk/types"

x/nft/simulation/decoder_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66

77
"github.com/stretchr/testify/require"
88

9-
"cosmossdk.io/x/nft"
10-
"cosmossdk.io/x/nft/keeper"
11-
"cosmossdk.io/x/nft/module"
12-
"cosmossdk.io/x/nft/simulation"
9+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
10+
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
11+
"cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
12+
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed
1313

1414
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
1515
sdk "github.com/cosmos/cosmos-sdk/types"

x/nft/simulation/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"math/rand"
55

66
"cosmossdk.io/core/address"
7-
"cosmossdk.io/x/nft"
7+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
88

99
"github.com/cosmos/cosmos-sdk/types/module"
1010
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

x/nft/simulation/genesis_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"github.com/stretchr/testify/require"
99

1010
sdkmath "cosmossdk.io/math"
11-
"cosmossdk.io/x/nft"
12-
nftmodule "cosmossdk.io/x/nft/module"
13-
"cosmossdk.io/x/nft/simulation"
11+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
12+
nftmodule "cosmossdk.io/x/nft/module" //nolint:staticcheck // deprecated and to be removed
13+
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed
1414

1515
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
1616
"github.com/cosmos/cosmos-sdk/types/module"

x/nft/simulation/msg_factory.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package simulation
33
import (
44
"context"
55

6-
"cosmossdk.io/x/nft"
7-
"cosmossdk.io/x/nft/keeper"
6+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
7+
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
88

99
"github.com/cosmos/cosmos-sdk/testutil/simsx"
1010
sdk "github.com/cosmos/cosmos-sdk/types"

x/nft/simulation/operations.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package simulation
33
import (
44
"math/rand"
55

6-
"cosmossdk.io/x/nft"
7-
"cosmossdk.io/x/nft/keeper"
6+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
7+
"cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
88

99
"github.com/cosmos/cosmos-sdk/baseapp"
1010
"github.com/cosmos/cosmos-sdk/client"

x/nft/simulation/operations_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010

1111
"cosmossdk.io/depinject"
1212
"cosmossdk.io/log"
13-
"cosmossdk.io/x/nft"
14-
nftkeeper "cosmossdk.io/x/nft/keeper"
15-
"cosmossdk.io/x/nft/simulation"
13+
"cosmossdk.io/x/nft" //nolint:staticcheck // deprecated and to be removed
14+
nftkeeper "cosmossdk.io/x/nft/keeper" //nolint:staticcheck // deprecated and to be removed
15+
"cosmossdk.io/x/nft/simulation" //nolint:staticcheck // deprecated and to be removed
1616
"cosmossdk.io/x/nft/testutil"
1717

1818
"github.com/cosmos/cosmos-sdk/client"

x/nft/testutil/app_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package testutil
22

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

66
"github.com/cosmos/cosmos-sdk/testutil/configurator"
77
_ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring

0 commit comments

Comments
 (0)