func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate {
	var genesisState GenesisState
	moduleCdc.MustUnmarshalJSON(data, &genesisState)
	InitGenesis(ctx, am.keeper, genesisState)
	return []abci.ValidatorUpdate{}
}
InitGenesis module init-genesis
package liquidator
import (
	"encoding/json"
	"github.com/cosmos/cosmos-sdk/codec"
	sdk "github.com/cosmos/cosmos-sdk/types"
	abci "github.com/tendermint/tendermint/abci/types"
)
var (
	_ sdk.AppModule      = AppModule{}
	_ sdk.AppModuleBasic = AppModuleBasic{}
)
const ModuleName = "liquidator"
type AppModuleBasic struct{}
var _ sdk.AppModuleBasic = AppModuleBasic{}
func (AppModuleBasic) Name() string {
	return ModuleName
}
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec) {
	RegisterCodec(cdc)
}
func (AppModuleBasic) DefaultGenesis() json.RawMessage {
	return moduleCdc.MustMarshalJSON(DefaultGenesisState())
}
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error {
	var data GenesisState
	err := moduleCdc.UnmarshalJSON(bz, &data)
	if err != nil {
		return err
	}
	return ValidateGenesis(data)
}
type AppModule struct {
	AppModuleBasic
	keeper Keeper
}
func NewAppModule(keeper Keeper) AppModule {
	return AppModule{
		AppModuleBasic: AppModuleBasic{},
		keeper:         keeper,
	}
}
func (AppModule) Name() string {
	return ModuleName
}
func (AppModule) RegisterInvariants(_ sdk.InvariantRouter) {}
func (AppModule) Route() string {
	return ModuleName
}
func (am AppModule) NewHandler() sdk.Handler {
	return NewHandler(am.keeper)
}
func (AppModule) QuerierRoute() string {
	return ModuleName
}
func (am AppModule) NewQuerierHandler() sdk.Querier {
	return NewQuerier(am.keeper)
}