-
Notifications
You must be signed in to change notification settings - Fork 37
/
genesis.go
27 lines (22 loc) · 943 Bytes
/
genesis.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
Copyright [2019] - [2021], PERSISTENCE TECHNOLOGIES PTE. LTD. and the persistenceCore contributors
SPDX-License-Identifier: Apache-2.0
*/
package app
import (
"encoding/json"
"github.com/persistenceOne/persistenceCore/v7/app/params"
)
// GenesisState 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
// NewDefaultGenesisState generates the default state for the Application.
func NewDefaultGenesisState() GenesisState {
encCfg := params.MakeEncodingConfig()
return ModuleBasics.DefaultGenesis(encCfg.Marshaler)
}