Documentation
¶
Index ¶
- func BuildCompilationReport(version string, contractInfo map[string]*compiler.Contract, ...) (poagenesis POA, controllergenesis POA, err error)
- func BuildPOA(solidityCode string, contractAddress string, controllerSource string, ...) (poagenesis POA, controllergenesis POA, err error)
- func CompileSolidityContract(soliditySource string) (map[string]*compiler.Contract, error)
- func GenerateGenesisJSON(outDir, keystore string, peers []*peers.Peer, alloc *Alloc, ...) error
- func GetSolidityCompilerVersion() (string, error)
- type Alloc
- type AllocRecord
- type POA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCompilationReport ¶
func BuildCompilationReport(version string, contractInfo map[string]*compiler.Contract, contractAddress string, solidityCode string, controllerInfo map[string]*compiler.Contract, controllerSource string, controllerAddress string, outputDir string) (poagenesis POA, controllergenesis POA, err error)
BuildCompilationReport outputs compiler results in a standard format and builds the poa structure that is written to the Genesis File
func BuildPOA ¶
func BuildPOA(solidityCode string, contractAddress string, controllerSource string, controllerAddress string, outDir string) (poagenesis POA, controllergenesis POA, err error)
BuildPOA builds the poa section of the genesis file, and saves a compilation report to outDir.
func CompileSolidityContract ¶
CompileSolidityContract compiles a solitity smart-contract using the compiler that comes with Geth.
func GenerateGenesisJSON ¶
func GenerateGenesisJSON(outDir, keystore string, peers []*peers.Peer, alloc *Alloc, contractAddress string, controllerAddress string) error
GenerateGenesisJSON compiles the POA solitity smart-contract with the peers baked into the whitelist. It then creates a genesis file with the corresponding POA section, and if no alloc section is provided, creates one with all the keys in keystore. The file is written to outDir.
func GetSolidityCompilerVersion ¶
GetSolidityCompilerVersion gets the version of the solidity compiler that comes with Geth.
Types ¶
type Alloc ¶
type Alloc map[string]*AllocRecord
Alloc is the section of a genesis file that contains the list of pre-funded accounts.
func BuildAlloc ¶
BuildAlloc builds the alloc structure of the genesis file
type AllocRecord ¶
AllocRecord is an object that contains information about a pre-funded acount.