2019-05-18 01:42:24 -07:00
|
|
|
package simapp
|
2018-04-25 21:27:40 -07:00
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
2020-02-18 04:50:13 -08:00
|
|
|
|
|
|
|
simappcodec "github.com/cosmos/cosmos-sdk/simapp/codec"
|
2018-04-25 21:27:40 -07:00
|
|
|
)
|
|
|
|
|
2019-05-16 08:25:32 -07:00
|
|
|
// The genesis state of the blockchain is represented here as a map of raw json
|
|
|
|
// messages key'd by a identifier string.
|
|
|
|
// The identifier is used to determine which module genesis information belongs
|
|
|
|
// to so it may be appropriately routed during init chain.
|
|
|
|
// Within this application default genesis information is retrieved from
|
|
|
|
// the ModuleBasicManager which populates json from each BasicModule
|
|
|
|
// object provided to it during init.
|
|
|
|
type GenesisState map[string]json.RawMessage
|
2018-04-25 21:27:40 -07:00
|
|
|
|
2019-05-18 01:42:24 -07:00
|
|
|
// NewDefaultGenesisState generates the default state for the application.
|
2018-11-04 20:26:46 -08:00
|
|
|
func NewDefaultGenesisState() GenesisState {
|
2020-02-18 04:50:13 -08:00
|
|
|
cdc := simappcodec.MakeCodec(ModuleBasics)
|
|
|
|
|
|
|
|
return ModuleBasics.DefaultGenesis(cdc)
|
2018-10-19 11:00:27 -07:00
|
|
|
}
|