The compilation configuration defines the parameters to use while compiling a target file or project.
- Type: String
- Description: Refers to the type of platform to be used to compile the underlying target. Currently,
crytic-compile
orsolc
can be used as the compilation platform. - Default:
crytic-compile
- Type: Struct
- Description: This struct is a platform-dependent structure which offers parameters for compiling the underlying project.
See below for the structure of
platformConfig
for each compilation platform. - Default: The
platformConfig
forcrytic-compile
is the default value for this struct.
- 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-compile
that 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:
.
- Type: String
- Description: Describes the version of
solc
that 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: ""
- 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: ""
- Type: [String]
- Description: Refers to any additional args that one may want to provide to
crytic-compile
. Runcrytic-compile --help
to view all of its supported flags. For example, if you would like to specify--compile-force-framework foundry
, theargs
value will be"args": ["--compile-force-framework", "foundry"]
.🚩 The
--export-format
and--export-dir
are already used during compilation withcrytic-compile
. Re-using these flags inargs
will cause the compilation to fail.
- Type: String
- Description: Refers to the target that is being compiled. The target must be a single
.sol
file.