contract

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package contract supports the compilation of solidity contracts.

If you wish to implement building a smart contract you would need to call the following functions:

func GetFinalSoliditySource(peers poatypes.PeerRecordList) (string, error)

GetFinalSoliditySource contains the current POA contract embedded within it. It then applies the peerlist to populate the initial whitelist on the contract.

func CompileSolidityContract(soliditySource string)(map[string]*compiler.Contract, error)

CompileSolidityContract takes the solidity source as a string, and returns a struct containing contract into, including bytecode and ABI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileSolidityContract

func CompileSolidityContract(soliditySource string) (map[string]*compiler.Contract, error)

CompileSolidityContract is a simple wrapper for the Geth compiler function. It takes the Solidity source as a string input parameter.

func GetFinalSoliditySource

func GetFinalSoliditySource(peers poatypes.PeerRecordList) (string, error)

GetFinalSoliditySource has the POA contract embedded within the function. This function applies the peers supplied to the inital white list for the POA contract and returns the Solidity source as a string ready to be compiled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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