platforms

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: AGPL-3.0 Imports: 14 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

This section is empty.

Variables

This section is empty.

Functions

func GetSystemSolcVersion

func GetSystemSolcVersion() (*semver.Version, error)

Types

type CryticCompilationConfig

type CryticCompilationConfig struct {
	// Target is the object that is being compiled. It can be a single `.sol` file or a whole directory
	Target string `json:"target"`

	// SolcVersion is the version of `solc` that will be installed prior to compiling with crytic-compile. If empty,
	// no special version is installed prior to compilation.
	SolcVersion string `json:"solcVersion"`

	// ExportDirectory is the location to search for exported build artifacts. By default, we look in `./crytic-export`
	ExportDirectory string `json:"exportDirectory"`

	// Args are additional arguments that can be provided to `crytic-compile`
	Args []string `json:"args"`
}

CryticCompilationConfig represents the various configuration options that can be provided by the user while using the `crytic-compile` platform

func NewCryticCompilationConfig

func NewCryticCompilationConfig(target string) *CryticCompilationConfig

NewCryticCompilationConfig returns the default configuration options while using `crytic-compile`

func (*CryticCompilationConfig) Compile

Compile uses the CryticCompilationConfig provided to compile a given target, parse the artifacts, and then create a list of types.Compilation.

func (*CryticCompilationConfig) GetTarget

func (c *CryticCompilationConfig) GetTarget() string

GetTarget returns the target for compilation

func (*CryticCompilationConfig) Platform

func (c *CryticCompilationConfig) Platform() string

Platform returns the platform type

func (*CryticCompilationConfig) SetTarget

func (c *CryticCompilationConfig) SetTarget(newTarget string)

SetTarget sets the new target for compilation

type PlatformConfig

type PlatformConfig interface {
	Compile() ([]types.Compilation, string, error)
	Platform() string
	GetTarget() string
	SetTarget(string)
}

PlatformConfig describes the interface all compilation platform configs must implement.

type SolcCompilationConfig

type SolcCompilationConfig struct {
	Target string `json:"target"`
}

func NewSolcCompilationConfig

func NewSolcCompilationConfig(target string) *SolcCompilationConfig

func (*SolcCompilationConfig) Compile

func (s *SolcCompilationConfig) Compile() ([]types.Compilation, string, error)

func (*SolcCompilationConfig) GetTarget

func (s *SolcCompilationConfig) GetTarget() string

GetTarget returns the target for compilation

func (*SolcCompilationConfig) Platform

func (s *SolcCompilationConfig) Platform() string

func (*SolcCompilationConfig) SetSolcOutputOptions

func (s *SolcCompilationConfig) SetSolcOutputOptions(v *semver.Version) string

SetSolcOutputOptions determines what outputOptions should be provided to solc given a semver.Version

func (*SolcCompilationConfig) SetTarget

func (s *SolcCompilationConfig) SetTarget(newTarget string)

SetTarget sets the new target for compilation

Jump to

Keyboard shortcuts

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