-
Notifications
You must be signed in to change notification settings - Fork 83
Configuration
alpharush edited this page Dec 27, 2021
·
8 revisions
- General compilation options
- Solc options
- Truffle options
- Embark options
- Dapp options
- Etherlime options
- Etherscan options
- Default values
crytic-compile
has specific options for each supported framework. Each option can be:
- set through the command line
--flag
(cli usage) - set through the additional arguments given to
CryticCompile
(lib usage).
-
--compile-force-framework
: Force the compile to a given framework (truffle, embark, dapp, etherlime, etherscan) (compile_force_framework
) -
--compile-remove-metadata
: Remove the metadata from the bytecodes (compile_remove_metadata
) -
--compile-custom-build
: Replace platform specific build command (compile_custom_build
)
-
--solc
: Specify a custom solc binary path (solc
) -
--solc-remaps
: Add remapping (solc_remaps
) -
--solc-args
: Add custom solc arguments. Example: --solc-args "--allow-path /tmp --evm-version byzantium" (solc_args
) -
--solc-disable-warnings
: Disable solc warnings (solc_disable_warnings
) -
--solc-working-dir
: Change the default working directory (solc_working_dir
)
-
--truffle-ignore-compile
: Do not run truffle compile (truffle_ignore_compile
) -
--truffle-build-directory
: Use an alternative truffle build directory (truffle_build_directory
) -
--truffle-version
: Use a local version of Truffle (npx) (truffle_version
)
-
--embark-ignore-compile
: Do not run embark build (embark_ignore_compile
) -
--embark-overwrite-config
: Install @trailofbits/embark-contract-export and add it to embark.json (embark_overwrite_config
)
Embark needs the embark-contract-export
plugin. You can install it manually, and add it to embark.json
, or use --embark-overwrite-config
to do it automatically.
-
--dapp-ignore-compile
: Do not run dapp build (dapp_ignore_compile
)
-
--etherlime-ignore-compile
: Do not run etherlime compile (etherlime_ignore_compile
) -
--etherlime-compile-arguments
: Add arbitrary arguments to etherlime compile (note: [dir] is the directory provided to crytic-compile)' (etherlime_compile_arguments
)
Addresses can be provided on the form:
-
0x...
(mainet) -
network:0x...
, wherenetwork
can bemainnet
,ropsten
,kovan
,rinkeby
,goerli
,tobalaba
,arbi
,testnet.arbi
,poly
,avax
,testnet.avax
,ftm
,bsc
,testnet.bsc
If the source code is not published on etherscan, crytic-compile
will raise InvalidCompilation
.
We recommend using solc-select
to allow crytic-compile
switching automatically to the correct solc version.
{
'compile_force_framework': None,
'compile_remove_metadata': False,
'compile_custom_build': None,
'solc': 'solc',
'solc_remaps': None,
'solc_args': None,
'solc_disable_warnings': False,
'solc_working_dir': None,
'truffle_version': None,
'truffle_ignore_compile': False,
'truffle_build_directory': 'build/contracts',
'embark_ignore_compile': False,
'embark_overwrite_config': False,
'dapp_ignore_compile': False,
'etherlime_ignore_compile': False,
'etherlime_compile_arguments': None,
}