compiler

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileSolidity

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

func CompileSolidityString

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

func CompileVyper

func CompileVyper(vyper string, sourcefiles ...string) (map[string]*Contract, error)

func ParseCombinedJSON

func ParseCombinedJSON(combinedJSON []byte, source string, languageVersion string, compilerVersion string, compilerOptions string) (map[string]*Contract, error)

func ParseVyperJSON

func ParseVyperJSON(combinedJSON []byte, source string, languageVersion string, compilerVersion string, compilerOptions string) (map[string]*Contract, error)

Types

type Contract

type Contract struct {
	Code        string            `json:"code"`
	RuntimeCode string            `json:"runtime-code"`
	Info        ContractInfo      `json:"info"`
	Hashes      map[string]string `json:"hashes"`
}

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"`
	SrcMap          interface{} `json:"srcMap"`
	SrcMapRuntime   string      `json:"srcMapRuntime"`
	AbiDefinition   interface{} `json:"abiDefinition"`
	UserDoc         interface{} `json:"userDoc"`
	DeveloperDoc    interface{} `json:"developerDoc"`
	Metadata        string      `json:"metadata"`
}

type Solidity

type Solidity struct {
	Path, Version, FullVersion string
	Major, Minor, Patch        int
}

func SolidityVersion

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

type Vyper

type Vyper struct {
	Path, Version, FullVersion string
	Major, Minor, Patch        int
}

func VyperVersion

func VyperVersion(vyper string) (*Vyper, error)

Jump to

Keyboard shortcuts

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