Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Version - dist version def
Version = "0.5.0"
)
Variables ¶
This section is empty.
Functions ¶
func HandleReceivedConfigRequest ¶
HandleReceivedConfigRequest - handle config request
Types ¶
type ChainConfig ¶
type ChainConfig struct { Alloc map[string]float64 `json:"alloc"` // Account balances at genesis AllocAddresses []common.Address // Account addresses NetworkID uint `json:"network"` // Network ID (0: mainnet, 1: testnet, etc...) ChainID common.Hash `json:"id"` // Hashed networkID, genesisSignature ChainVersion string `json:"version"` // Network version }
ChainConfig - chain configuration
func FromBytes ¶
func FromBytes(b []byte) (*ChainConfig, error)
FromBytes - decode byte array into chain config
func NewChainConfig ¶
func NewChainConfig(genesisFilePath string) (*ChainConfig, error)
NewChainConfig - generate new ChainConfig from genesis.json file
func ReadChainConfigFromMemory ¶
func ReadChainConfigFromMemory() (*ChainConfig, error)
ReadChainConfigFromMemory - read chain configuration from chain config json file
func (*ChainConfig) Bytes ¶
func (chainConfig *ChainConfig) Bytes() []byte
Bytes - convert given chainConfig to byte array
func (*ChainConfig) String ¶
func (chainConfig *ChainConfig) String() string
String - convert given chainConfig to string
func (*ChainConfig) WriteToMemory ¶
func (chainConfig *ChainConfig) WriteToMemory() error
WriteToMemory - write given chainConfig to memory
Click to show internal directories.
Click to hide internal directories.