sol

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package sol provides a convenient interface for calling the 'solc' Solidity Compiler from Go.

Index

Constants

This section is empty.

Variables

View Source
var ErrStatementNoSrc = errors.New("statement without src reference")

Functions

func WhichSolc

func WhichSolc() (string, error)

Types

type Compiler

type Compiler interface {
	SetAllowPaths(paths []string) Compiler
	Compile(prefix, path string, optimize int) (map[string]*Contract, error)
	CompileWithCoverage(prefix, path string) (map[string]*Contract, error)
}

func NewSolCompiler

func NewSolCompiler(solcPath string) (Compiler, error)

type Contract

type Contract struct {
	Name            string
	SourcePath      string
	AllPaths        []string
	CompilerVersion string
	Address         common.Address
	Coverage        bool
	Statements      [][]int

	ABI []byte
	Bin string
}

type CoverageEventIDArgs

type CoverageEventIDArgs struct {
	EventDefinitionID    uint64
	EventDefinitionIDHex string
	RandomIDs            []uint64
	ContractName         string
}

type CoverageMarkerArgs

type CoverageMarkerArgs struct {
	EventDefinitionID    uint64
	RandomIDs            []uint64
	EventCallArgValue    []string
	EventCallArgHexValue []string
}

type EventDefinitionArgs

type EventDefinitionArgs struct {
	EventDefinitionID uint64
	RandomIDs         []uint64
}

type Values

type Values []interface{}

Jump to

Keyboard shortcuts

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