compile

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintResponse

func PrintResponse(resp Response, cli bool)

Types

type BinaryResponse

type BinaryResponse struct {
	Binary string          `json:"binary"`
	Abi    json.RawMessage `json:"abi"`
	Error  string          `json:"error"`
}

func LinkContract added in v0.22.0

func LinkContract(contract SolidityOutputContract, libraries map[string]string) (*BinaryResponse, error)

func LinkFile added in v0.22.0

func LinkFile(file string, libraries map[string]string) (*BinaryResponse, error)

type Response

type Response struct {
	Objects []ResponseItem `json:"objects"`
	Warning string         `json:"warning"`
	Version string         `json:"version"`
	Error   string         `json:"error"`
}

func Compile added in v0.22.0

func Compile(file string, optimize bool, libraries map[string]string) (*Response, error)

type ResponseItem

type ResponseItem struct {
	Filename   string                 `json:"filename"`
	Objectname string                 `json:"objectname"`
	Binary     SolidityOutputContract `json:"binary"`
}

Compile response object

type SolidityInput

type SolidityInput struct {
	Language string                         `json:"language"`
	Sources  map[string]SolidityInputSource `json:"sources"`
	Settings struct {
		Libraries map[string]map[string]string `json:"libraries"`
		Optimizer struct {
			Enabled bool `json:"enabled"`
		} `json:"optimizer"`
		OutputSelection struct {
			File struct {
				OutputType []string `json:"*"`
			} `json:"*"`
		} `json:"outputSelection"`
	} `json:"settings"`
}

type SolidityInputSource

type SolidityInputSource struct {
	Content string   `json:"content,omitempty"`
	Urls    []string `json:"urls,omitempty"`
}

type SolidityOutput

type SolidityOutput struct {
	Contracts map[string]map[string]SolidityOutputContract
	Errors    []struct {
		Component        string
		FormattedMessage string
		Message          string
		Severity         string
		Type             string
	}
}

type SolidityOutputContract

type SolidityOutputContract struct {
	Abi json.RawMessage
	Evm struct {
		Bytecode struct {
			Object         string
			Opcodes        string
			LinkReferences json.RawMessage
		}
	}
	Devdoc   json.RawMessage
	Userdoc  json.RawMessage
	Metadata string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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