func AppStateFn(cdc *codec.Codec, simManager *module.SimulationManager) simtypes.AppStateFn {
	return func(r *rand.Rand, accs []simtypes.Account, config simtypes.Config,
	) (appState json.RawMessage, simAccs []simtypes.Account, chainID string, genesisTimestamp time.Time) {
		genesisTimestamp = simtypes.RandTimestamp(r)
		chainID = config.ChainID
		appParams := make(simtypes.AppParams)
		appState, simAccs = AppStateRandomizedFn(simManager, r, cdc, accs, genesisTimestamp, appParams)
		return appState, simAccs, chainID, genesisTimestamp
	}
}
AppStateFn returns the initial application state using a genesis or the simulation parameters.
It panics if the user provides files for both of them.
If a file is not given for the genesis or the sim params, it creates a randomized one.
package simapp
import (
	"encoding/json"
	"fmt"
	"math/rand"
	"time"
	simapparams "github.com/Dipper-Labs/Dipper-Protocol/app/simapp/params"
	"github.com/Dipper-Labs/Dipper-Protocol/codec"
	"github.com/Dipper-Labs/Dipper-Protocol/types/module"
	simtypes "github.com/Dipper-Labs/Dipper-Protocol/types/simulation"
)