compile

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AddressLength    = 40
	RelocationLength = 20
)

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 RequestBinaryLinkage

func RequestBinaryLinkage(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 RequestCompile

func RequestCompile(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
}

Jump to

Keyboard shortcuts

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