Documentation ¶
Index ¶
- func GetSystemSolcVersion() (*semver.Version, error)
- type CryticCompilationConfig
- type PlatformConfig
- type SolcCompilationConfig
- func (s *SolcCompilationConfig) Compile() ([]types.Compilation, string, error)
- func (s *SolcCompilationConfig) GetTarget() string
- func (s *SolcCompilationConfig) Platform() string
- func (s *SolcCompilationConfig) SetSolcOutputOptions(v *semver.Version) string
- func (s *SolcCompilationConfig) SetTarget(newTarget string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSystemSolcVersion ¶
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 ¶
func (c *CryticCompilationConfig) Compile() ([]types.Compilation, string, error)
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