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 ¶
- func CompileSolidityContract(soliditySource string) (map[string]*compiler.Contract, error)
- func GetControllerSoliditySource(contractAddress string) (string, error)
- func GetFinalSoliditySource(peers []*peers.Peer) (string, error)
- func GetFinalSoliditySourceFromAddress(peers []*MinimalPeerRecord) (string, error)
- type MinimalPeerRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileSolidityContract ¶
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 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.