sol

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 18 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

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