contract

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: MIT Imports: 9 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 GetControllerSoliditySource added in v0.3.1

func GetControllerSoliditySource(contractAddress string) (string, error)

func GetFinalSoliditySource

func GetFinalSoliditySource(peers []*peers.Peer) (string, error)

func GetFinalSoliditySourceFromAddress added in v0.3.0

func GetFinalSoliditySourceFromAddress(peers []*MinimalPeerRecord) (string, error)

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

Types

type MinimalPeerRecord added in v0.3.0

type MinimalPeerRecord struct {
	Address string
	Moniker string
}

Jump to

Keyboard shortcuts

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