compiler

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MPL-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadSolidity

func DownloadSolidity(version string, dst string, renameDst bool) error

DownloadSolidity downloads the solidity compiler

Types

type Artifact

type Artifact struct {
	Abi        string
	Bin        string
	BinRuntime string
}

Artifact is a contract output from the compiler

func NewArtifact

func NewArtifact(abi, bin, binRuntime string) *Artifact

type Compiler

type Compiler interface {
	// Compile compiles a file
	Compile(files ...string) (map[string]*Artifact, error)
}

Compiler is an Ethereum compiler

func NewCompiler

func NewCompiler(name string, path string) (Compiler, error)

NewCompiler instantiates a new compiler

func NewSolidityCompiler

func NewSolidityCompiler(path string) Compiler

NewSolidityCompiler instantiates a new solidity compiler

func NewVyperCompiler

func NewVyperCompiler(path string) Compiler

NewVyperCompiler instantiates a new vyper compiler

type Solidity

type Solidity struct {
	Path string
}

Solidity is the solidity compiler

func (*Solidity) Compile

func (s *Solidity) Compile(files ...string) (map[string]*Artifact, error)

Compile implements the compiler interface

func (*Solidity) CompileCode

func (s *Solidity) CompileCode(code string) (map[string]*Artifact, error)

CompileCode compiles a solidity code

type Vyper

type Vyper struct {
	// contains filtered or unexported fields
}

Vyper is the vyper compiler

func (*Vyper) Compile

func (v *Vyper) Compile(files ...string) (map[string]*Artifact, error)

Compile implements the compiler interface

Jump to

Keyboard shortcuts

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