Compilation Configuration
The compilation configuration defines the parameters to use while compiling a target file or project.
platform
- Type: String
- Description: Refers to the type of platform to be used to compile the underlying target. Currently,
crytic-compileorsolccan be used as the compilation platform. - Default:
crytic-compile
platformConfig
- Type: Struct
- Description: This struct is a platform-dependent structure which offers parameters for compiling the underlying project.
See below for the structure of
platformConfigfor each compilation platform. - Default: The
platformConfigforcrytic-compileis the default value for this struct.
platformConfig for crytic-compile
target
- Type: String
- Description: Refers to the target that is being compiled.
🚩 Note that if you are using a compilation platform, such as Foundry or Hardhat, the default value for
target,., should not be changed. The.is equivalent to tellingcrytic-compilethat the entire project needs to compiled, including any dependencies and remappings. In fact, unless you want to compile a single file, that has no third-party imports from, for example, OpenZeppelin, the default value should not be changed. - Default:
.
solcVersion
- Type: String
- Description: Describes the version of
solcthat will be installed and then used for compilation. Note that if you are using a compilation platform, such as Foundry or Hardhat, this option does not need to be set. - Default: ""
exportDirectory
- Type: String
- Description: Describes the directory where all compilation artifacts should be stored after compilation. Leaving it
empty will lead to the compilation artifacts being stored in
crytic-export/. - Default: ""
args
- Type: [String]
- Description: Refers to any additional args that one may want to provide to
crytic-compile. Runcrytic-compile --helpto view all of its supported flags. For example, if you would like to specify--compile-force-framework foundry, theargsvalue will be"args": ["--compile-force-framework", "foundry"].🚩 The
--export-formatand--export-dirare already used during compilation withcrytic-compile. Re-using these flags inargswill cause the compilation to fail. - Default:
[]
platformConfig for solc
target
- Type: String
- Description: Refers to the target that is being compiled. The target must be a single
.solfile.