From 9966512e65d63aca29abc76684dc2739e6e34030 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 08:16:02 -0500 Subject: [PATCH] chore: module assertions for `x/auction` (#191) (#197) * add assertions * modify signature (cherry picked from commit a9540dac92b2fcdb94ec9a59bde7558bc1019ac3) Co-authored-by: Alex Johnson --- x/auction/module.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/x/auction/module.go b/x/auction/module.go index 825bd60c..4afb72fc 100644 --- a/x/auction/module.go +++ b/x/auction/module.go @@ -8,7 +8,6 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" storetypes "cosmossdk.io/store/types" - abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -27,8 +26,12 @@ import ( ) var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleBasic = AppModule{} + _ module.HasGenesis = AppModule{} + _ module.HasServices = AppModule{} + _ module.HasInvariants = AppModule{} + + _ appmodule.AppModule = AppModule{} ) // ConsensusVersion defines the current x/auction module consensus version. @@ -127,12 +130,11 @@ func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // InitGenesis performs the module's genesis initialization for the auction // module. It returns no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) { var genState types.GenesisState cdc.MustUnmarshalJSON(gs, &genState) am.keeper.InitGenesis(ctx, genState) - return []abci.ValidatorUpdate{} } // ExportGenesis returns the auction module's exported genesis state as raw