diff --git a/x/auth/module.go b/x/auth/module.go index e302de83181..e0ecddac85b 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -126,9 +126,6 @@ func (AppModule) Name() string { return types.ModuleName } -// RegisterInvariants performs a no-op. -func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/auth/vesting/module.go b/x/auth/vesting/module.go index 04ace8b6f06..77047e3e555 100644 --- a/x/auth/vesting/module.go +++ b/x/auth/vesting/module.go @@ -98,9 +98,6 @@ func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// RegisterInvariants performs a no-op; there are no invariants to enforce. -func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), NewMsgServerImpl(am.accountKeeper, am.bankKeeper)) diff --git a/x/authz/module/module.go b/x/authz/module/module.go index 13688dfdae1..64d72163551 100644 --- a/x/authz/module/module.go +++ b/x/authz/module/module.go @@ -134,13 +134,6 @@ func (AppModule) Name() string { return authz.ModuleName } -// RegisterInvariants does nothing, there are no invariants to enforce -func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -func (am AppModule) NewHandler() sdk.Handler { - return nil -} - // InitGenesis performs genesis initialization for the authz module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/consensus/module.go b/x/consensus/module.go index 60b30752e7d..3dd825782ed 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -128,9 +128,6 @@ func (am AppModule) ExportGenesis(sdk.Context, codec.JSONCodec) json.RawMessage // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } -// RegisterInvariants does nothing, there are no invariants to enforce -func (am AppModule) RegisterInvariants(sdk.InvariantRegistry) {} - func init() { appmodule.Register( &modulev1.Module{}, diff --git a/x/crisis/module.go b/x/crisis/module.go index bc85df429b1..4aa89066357 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -138,9 +138,6 @@ func (AppModule) Name() string { return types.ModuleName } -// RegisterInvariants performs a no-op. -func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) diff --git a/x/evidence/module.go b/x/evidence/module.go index f82777625b7..87e87fde565 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -141,9 +141,6 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) } -// RegisterInvariants registers the evidence module's invariants. -func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} - // InitGenesis performs the evidence module's genesis initialization It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/feegrant/module/module.go b/x/feegrant/module/module.go index db0f97134a5..837780732f1 100644 --- a/x/feegrant/module/module.go +++ b/x/feegrant/module/module.go @@ -142,9 +142,6 @@ func (AppModule) Name() string { return feegrant.ModuleName } -// RegisterInvariants registers the feegrant module invariants. -func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} - // InitGenesis performs genesis initialization for the feegrant module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/group/module/module.go b/x/group/module/module.go index ba35298ade7..ece26eb650b 100644 --- a/x/group/module/module.go +++ b/x/group/module/module.go @@ -125,10 +125,6 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { keeper.RegisterInvariants(ir, am.keeper) } -func (am AppModule) NewHandler() sdk.Handler { - return nil -} - // InitGenesis performs genesis initialization for the group module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/mint/module.go b/x/mint/module.go index a20e1112123..05be0336642 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -143,9 +143,6 @@ func (AppModule) Name() string { return types.ModuleName } -// RegisterInvariants registers the mint module invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - // RegisterServices registers a gRPC query service to respond to the // module-specific gRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/nft/module/module.go b/x/nft/module/module.go index c3b14941e47..cb34375e5b1 100644 --- a/x/nft/module/module.go +++ b/x/nft/module/module.go @@ -126,13 +126,6 @@ func (AppModule) Name() string { return nft.ModuleName } -// RegisterInvariants does nothing, there are no invariants to enforce -func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -func (am AppModule) NewHandler() sdk.Handler { - return nil -} - // InitGenesis performs genesis initialization for the nft module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { diff --git a/x/params/module.go b/x/params/module.go index e0f1ec9e5c4..867a8735aa3 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -2,24 +2,20 @@ package params import ( "context" - "encoding/json" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - abci "github.com/cometbft/cometbft/abci/types" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" modulev1 "cosmossdk.io/api/cosmos/params/module/v1" "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" - store "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/params/client/cli" @@ -34,6 +30,9 @@ var ( _ module.AppModuleSimulation = AppModule{} ) +// ConsensusVersion defines the current x/params module consensus version. +const ConsensusVersion = 1 + // AppModuleBasic defines the basic application module used by the params module. type AppModuleBasic struct{} @@ -47,15 +46,6 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { proposal.RegisterLegacyAminoCodec(cdc) } -// DefaultGenesis returns default genesis state as raw bytes for the params -// module. -func (AppModuleBasic) DefaultGenesis(_ codec.JSONCodec) json.RawMessage { return nil } - -// ValidateGenesis performs genesis state validation for the params module. -func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, config client.TxEncodingConfig, _ json.RawMessage) error { - return nil -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the params module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) { if err := proposal.RegisterQueryHandlerClient(context.Background(), mux, proposal.NewQueryClient(clientCtx)); err != nil { @@ -98,13 +88,6 @@ func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -// InitGenesis performs a no-op. -func (am AppModule) InitGenesis(_ sdk.Context, _ codec.JSONCodec, _ json.RawMessage) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // GenerateGenesisState performs a no-op. func (AppModule) GenerateGenesisState(simState *module.SimulationState) {} @@ -122,13 +105,8 @@ func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.Weig return nil } -// ExportGenesis performs a no-op. -func (am AppModule) ExportGenesis(_ sdk.Context, _ codec.JSONCodec) json.RawMessage { - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 1 } +func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // // App Wiring Setup diff --git a/x/slashing/module.go b/x/slashing/module.go index a0c8f4b4099..2fe26201028 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -133,9 +133,6 @@ func (AppModule) Name() string { return types.ModuleName } -// RegisterInvariants registers the slashing module invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 8cf484e8ff8..ed5cba10be8 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -38,9 +38,8 @@ func init() { types.RegisterLegacyAminoCodec(codec.NewLegacyAmino()) } -const ( - consensusVersion uint64 = 2 -) +// ConsensusVersion defines the current x/upgrade module consensus version. +const ConsensusVersion uint64 = 2 var ( _ module.BeginBlockAppModule = AppModule{} @@ -104,9 +103,6 @@ func (am AppModule) IsOnePerModuleType() {} // IsAppModule implements the appmodule.AppModule interface. func (am AppModule) IsAppModule() {} -// RegisterInvariants does nothing, there are no invariants to enforce -func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -153,7 +149,7 @@ func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONCodec) json.RawMe } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return consensusVersion } +func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // BeginBlock calls the upgrade module hooks //