package genexchain

import (
	"encoding/json"

	feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
	evmtypes "github.com/cosmos/evm/x/vm/types"

	minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
)

// GenesisState defines the genesis state of the application
type GenesisState map[string]json.RawMessage

// NewEVMGenesisState returns the default EVM genesis state with Genex customizations
func NewEVMGenesisState() *evmtypes.GenesisState {
	evmGenState := evmtypes.DefaultGenesisState()
	evmGenState.Params.ActiveStaticPrecompiles = evmtypes.AvailableStaticPrecompiles
	evmGenState.Preinstalls = evmtypes.DefaultPreinstalls
	return evmGenState
}

// NewMintGenesisState returns the mint genesis state with Genex denom
func NewMintGenesisState() *minttypes.GenesisState {
	mintGenState := minttypes.DefaultGenesisState()
	mintGenState.Params.MintDenom = GenexBondDenom // agnx
	return mintGenState
}

// NewFeeMarketGenesisState returns the fee market genesis state
// NoBaseFee = true implements Genex's gas subsidy model (users pay zero gas)
func NewFeeMarketGenesisState() *feemarkettypes.GenesisState {
	feeMarketGenState := feemarkettypes.DefaultGenesisState()
	feeMarketGenState.Params.NoBaseFee = true
	return feeMarketGenState
}
