Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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.
type POA ¶
type POA struct {
Address string `json:"address"`
Abi string `json:"abi"`
Code string `json:"code"`
}
POA is the section of a genesis file that contains information about the POA smart-contract.
func BuildCompilationReport ¶
func BuildCompilationReport(version string, contractInfo map[string]*compiler.Contract, contractAddress string, solidityCode string, outputDir string) (POA, error)
BuildCompilationReport outputs compiler results in a standard format and builds the poa structure that is written to the Genesis File