func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate {
	var genesisState types.GenesisState
	types.ModuleCdc.MustUnmarshalJSON(data, &genesisState)
	am.keeper.SetParams(ctx, genesisState.Params)
	am.keeper.StateDB.WithContext(ctx).ImportState(genesisState)
	return nil
}
InitGenesis instantiates the genesis state
package vm
import (
	"encoding/json"
	"math/rand"
	"github.com/gorilla/mux"
	"github.com/spf13/cobra"
	abci "github.com/tendermint/tendermint/abci/types"
	"github.com/Dipper-Labs/Dipper-Protocol/app/v0/vm/client/cli"
	"github.com/Dipper-Labs/Dipper-Protocol/app/v0/vm/client/rest"
	"github.com/Dipper-Labs/Dipper-Protocol/app/v0/vm/simulation"
	"github.com/Dipper-Labs/Dipper-Protocol/app/v0/vm/types"
	"github.com/Dipper-Labs/Dipper-Protocol/client/context"
	"github.com/Dipper-Labs/Dipper-Protocol/codec"
	sdk "github.com/Dipper-Labs/Dipper-Protocol/types"
	"github.com/Dipper-Labs/Dipper-Protocol/types/module"
	simtypes "github.com/Dipper-Labs/Dipper-Protocol/types/simulation"
)
var (
	_ module.AppModule           = AppModule{}
	_ module.AppModuleBasic      = AppModuleBasic{}
	_ module.AppModuleSimulation = AppModule{}
)
type AppModuleBasic struct{}
func (a AppModuleBasic) Name() string {
	return types.ModuleName
}
func (a AppModuleBasic) RegisterCodec(cdc *codec.Codec) {
	types.RegisterCodec(cdc)
}
func (a AppModuleBasic) DefaultGenesis() json.RawMessage {
	return types.ModuleCdc.MustMarshalJSON(types.DefaultGenesisState())
}
func (a AppModuleBasic) ValidateGenesis(value json.RawMessage) error {
	var data types.GenesisState
	if err := types.ModuleCdc.UnmarshalJSON(value, &data); err != nil {
		return err
	}
	return ValidateGenesis(data)
}
func (a AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router) {
	rest.RegisterRoutes(ctx, rtr)
}
func (a AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command {
	return nil
}
func (a AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command {
	return cli.GetQueryCmd(types.StoreKey, cdc)
}
var _ module.AppModuleBasic = AppModuleBasic{}
type AppModule struct {
	AppModuleBasic
	keeper          Keeper
	akForSimulation AccountKeeper  
}
func (am *AppModule) WithAccountKeeper(ak AccountKeeper) *AppModule {
	am.akForSimulation = ak
	return am
}