gen

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const TotalMoney = algoTotalMoney - algoRewardPool + rewardPoolBalanceAtInception + inputPoolBalanceAtInception

TotalMoney represents the total amount of MicroAlgos 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.

func InitialBalance

func InitialBalance(ticker, addr string) uint64

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
	InputPool         basics.Address
	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 Ticker

type Ticker struct {
	Quote    float64           `json:"quote"`
	Balances map[string]uint64 `json:"balances"`
}

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