gen

package
v0.0.0-...-15eb78e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const TotalMoney uint64 = 10 * 1e9 * 1e6

TotalMoney represents the total amount of MicroNovas in the system

Variables

View Source
var DefaultGenesis = GenesisData{
	FirstPartKeyRound: 0,
	LastPartKeyRound:  3000000,
}

DefaultGenesis should be used as the default initial state for any GenesisData instance (because we have no ctors...)

Functions

func GenerateGenesisFiles

func GenerateGenesisFiles(genesisData GenesisData, consensus config.ConsensusProtocols, outDir string, verboseOut io.Writer) error

GenerateGenesisFiles generates the genesis.json file and wallet files for a give genesis configuration.

Types

type GenesisData

type GenesisData struct {
	NetworkName       string
	VersionModifier   string
	ConsensusProtocol protocol.ConsensusVersion
	FirstPartKeyRound uint64
	LastPartKeyRound  uint64
	PartKeyDilution   uint64
	Wallets           []WalletData
	FeeSink           basics.Address
	RewardsPool       basics.Address
	DevMode           bool
	Comment           string
}

GenesisData represents the genesis data for creating a genesis.json and wallets

func LoadGenesisData

func LoadGenesisData(file string) (gen GenesisData, err error)

LoadGenesisData loads a GenesisData structure from a json file

type WalletData

type WalletData struct {
	Name   string
	Stake  float64
	Online bool
}

WalletData represents a wallet's name, percent stake, and initial online status for a genesis.json file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL