compiler

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2016 License: GPL-3.0 Imports: 12 Imported by: 2

Documentation

Overview

Package compiler wraps the Solidity compiler executable (solc).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileSolidity added in v1.5.0

func CompileSolidity(solc string, sourcefiles ...string) (map[string]*Contract, error)

CompileSolidity compiles all given Solidity source files.

func CompileSolidityString added in v1.5.0

func CompileSolidityString(solc, source string) (map[string]*Contract, error)

CompileSolidityString builds and returns all the contracts contained within a source string.

func SaveInfo

func SaveInfo(info *ContractInfo, filename string) (common.Hash, error)

SaveInfo serializes info to the given file and returns its Keccak256 hash.

Types

type Contract

type Contract struct {
	Code string       `json:"code"`
	Info ContractInfo `json:"info"`
}

type ContractInfo

type ContractInfo struct {
	Source          string      `json:"source"`
	Language        string      `json:"language"`
	LanguageVersion string      `json:"languageVersion"`
	CompilerVersion string      `json:"compilerVersion"`
	CompilerOptions string      `json:"compilerOptions"`
	AbiDefinition   interface{} `json:"abiDefinition"`
	UserDoc         interface{} `json:"userDoc"`
	DeveloperDoc    interface{} `json:"developerDoc"`
}

type Solidity

type Solidity struct {
	Path, Version, FullVersion string
}

Solidity contains information about the solidity compiler.

func SolidityVersion added in v1.5.0

func SolidityVersion(solc string) (*Solidity, error)

SolidityVersion runs solc and parses its version output.

Jump to

Keyboard shortcuts

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