Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Commit

Permalink
chore: module assertions for x/auction (#191)
Browse files Browse the repository at this point in the history
* add assertions

* modify signature
  • Loading branch information
Alex Johnson authored Nov 3, 2023
1 parent db68537 commit a9540da
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions x/auction/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a9540da

Please sign in to comment.