Skip to content
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

removing AppModuleBasic from Capability #4982

Merged
merged 5 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion modules/capability/capability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type CapabilityTestSuite struct {
}

func (suite *CapabilityTestSuite) SetupTest() {
encodingCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModuleBasic{})
encodingCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModule{})
suite.cdc = encodingCfg.Codec

suite.storeKey = storetypes.NewKVStoreKey(types.StoreKey)
Expand Down
2 changes: 1 addition & 1 deletion modules/capability/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (suite *KeeperTestSuite) SetupTest() {
key := storetypes.NewKVStoreKey(types.StoreKey)
testCtx := testutil.DefaultContextWithDB(suite.T(), key, storetypes.NewTransientStoreKey("transient_test"))
suite.ctx = testCtx.Ctx
encCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModuleBasic{})
encCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModule{})
suite.keeper = keeper.NewKeeper(encCfg.Codec, key, key)
}

Expand Down
15 changes: 1 addition & 14 deletions modules/capability/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"time"

gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"

"cosmossdk.io/core/appmodule"

Expand All @@ -26,7 +25,6 @@ import (

var (
_ module.AppModule = (*AppModule)(nil)
_ module.AppModuleBasic = (*AppModuleBasic)(nil)
_ module.AppModuleSimulation = (*AppModule)(nil)
_ module.HasName = (*AppModule)(nil)
_ module.HasConsensusVersion = (*AppModule)(nil)
Expand All @@ -48,11 +46,6 @@ func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic {
return AppModuleBasic{cdc: cdc}
}

// Name returns the capability module's name.
func (AppModuleBasic) Name() string {
return types.ModuleName
}

// RegisterLegacyAminoCodec does nothing. Capability does not support amino.
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}

Expand All @@ -77,12 +70,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *gwruntime.ServeMux) {
}

// GetTxCmd returns the capability module's root tx command.
func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil }

// GetQueryCmd returns the capability module's root query command.
func (AppModuleBasic) GetQueryCmd() *cobra.Command { return nil }

// ----------------------------------------------------------------------------
// AppModule
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -112,7 +99,7 @@ func (AppModule) IsAppModule() {}

// Name returns the capability module's name.
func (am AppModule) Name() string {
return am.AppModuleBasic.Name()
return types.ModuleName
}

// InitGenesis performs the capability module's genesis initialization It returns
Expand Down
2 changes: 1 addition & 1 deletion modules/capability/simulation/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

func TestDecodeStore(t *testing.T) {
encodingCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModuleBasic{})
encodingCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModule{})
dec := simulation.NewDecodeStore(encodingCfg.Codec)

capOwners := types.CapabilityOwners{
Expand Down
Loading