prefunds

package
v0.0.0-...-3f8eaf4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package prefunds deals with prefunds addresses and their balances

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrefundPath

func GetPrefundPath(chain string) string

func LoadPrefundMap

func LoadPrefundMap(chain string, thePath string) (*map[base.Address]types.SimpleName, error)

LoadPrefundMap loads the prefund names from file if not already loaded or from the cache if it is. A pointer to the data is returned, so the caller should not modify it.

Types

type Allocation

type Allocation struct {
	Address base.Address `json:"address" csv:"address"`
	Balance big.Int      `json:"balance" csv:"balance"`
}

Allocation is a single allocation in the genesis file

func GetLargestPrefund

func GetLargestPrefund(chain, thePath string) (Allocation, error)

func LoadPrefunds

func LoadPrefunds(chain string, thePath string, userCallback allocCallback) ([]Allocation, error)

LoadPrefunds loads the prefunds from the genesis file and processes each with provided callback if present

Jump to

Keyboard shortcuts

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