Library to help smart contract compilation. It includes support for:
- Direct solc compilation
- Foundry
- Hardhat
- Brownie
- Buidler
- Dapp
- Embark
- Etherlime
- Etherscan (including several alt-chain explorers and testnets)
- Truffle
- Waffle
To force compilation with a specific framework, use the --compile-force-framework flag. For example, to force compilation with Hardhat:
crytic-compile . --compile-force-framework hardhatSee the Configuration documentation for advanced usages.
The plugin is used in Trail of Bits tools, including:
pip3 install crytic-compileIn the root directory of your project e.g. same directory as hardhat.config.js or foundry.toml, run:
crytic-compile .Crytic-compile will generate crytic-export/contracts.json containing the AST/ABI and bytecodes of the contracts.
Run crytic-compile --help for more options.
If your project uses libraries with external functions, they can be linked to their deployed address with the --compile-libraries flag. For example, if you have a library SafeMath deployed at 0xff, you can link it with:
crytic-compile . --compile-libraries "(SafeMath, 0xff)"If you are fuzzing with Echidna or Medusa, follow this tutorial on linking libraries.
See the library documentation.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
