Skip to content

Commit

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

* modify signature

(cherry picked from commit a9540da)

Co-authored-by: Alex Johnson <alex@skip.money>
  • Loading branch information
mergify[bot] and aljo242 committed Nov 6, 2023
1 parent aafde29 commit 9966512
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 9966512

Please sign in to comment.