--- id: crytic-compile version: "0.4.2" license: AGPL-3.0-only license_treatment: agpl maintenance: active --- # crytic-compile — Util to facilitate smart contracts compilation. License: agpl · Maintenance: active · Downloads: 220.7K/mo ## What it is and what it does Crytic-compile is a compilation abstraction layer for Ethereum smart contracts. It detects and invokes the build system used in your project—whether that's Foundry, Hardhat, Brownie, Truffle, or direct Solc—and normalizes the output into a standard JSON format containing contract AST, ABI, and bytecode. This eliminates the need to write framework-specific build logic when you want to analyze or process contracts programmatically. The package is primarily used as a dependency in security analysis tools like Slither and Echidna, but can also be invoked as a command-line utility or imported as a library. It handles library linking, supports forcing compilation with a specific framework, and integrates with Etherscan and Sourcify for retrieving already-compiled contracts. The three runtime dependencies (pycryptodome, cbor2, solc-select) provide cryptographic utilities, binary encoding support, and Solidity compiler version management. Use it for: - Analyze smart contracts with Slither or Echidna without manually configuring each project's build system. - Extract contract AST and ABI from projects using different frameworks in a unified format for custom tooling. - Retrieve and compile verified contracts from Etherscan or Sourcify as part of an automated audit pipeline. - Link external libraries to their deployed addresses before fuzzing or formal verification. - Build a CI/CD pipeline that compiles contracts regardless of the underlying framework used in the repository. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Crytic-compile abstracts smart contract compilation across multiple frameworks and toolchains, generating standardized AST, ABI, and bytecode output regardless of whether your project uses Solc, Foundry, Hardhat, Brownie, or other Ethereum development tools. Yes, if you are building Ethereum development tooling, security analysis, or automation that needs to work across multiple smart contract frameworks. The low install friction, active maintenance, and zero known vulnerabilities make it a safe dependency. However, do not install if your project cannot comply with AGPL-3.0-only copyleft requirements—this license mandates open-source redistribution of any derivative work. ## Install pip install crytic-compile uv add crytic-compile poetry add crytic-compile ## Installing crytic-compile Before you install: Low install friction with a pure Python wheel distribution. The package is actively maintained with a recent release and supports current Python versions (3.10–3.14). Three runtime dependencies (pycryptodome, cbor2, solc-select) are all standard and widely available. License in practice: Licensed under AGPL-3.0-only, which requires that any derivative work or modification be distributed under the same license and that source code be made available. This is a copyleft license; use it only if your project can comply with open-source redistribution requirements. Quickstart: pip install crytic-compile crytic-compile . --compile-force-framework hardhat # Generates crytic-export/contracts.json with AST/ABI and bytecodes Requires Python >=3.10 and !=3.12.0. The underlying solc-select dependency will download compiler binaries on first use, which may take time depending on network and disk availability. Verify before relying: - Whether solc-select automatically downloads required Solidity compiler versions or if manual setup is needed. - Performance characteristics when compiling large projects with many contracts. - Compatibility details with alt-chain explorers and testnets mentioned in the description. ## Package facts - License: AGPL-3.0-only (agpl) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 220.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags smart contract compilation abstraction, solidity compiler wrapper, multi-framework contract build, ethereum ast extraction, hardhat foundry brownie compiler, smart-contracts, ethereum, solidity [View on SkillFed](https://skillfed.io/packages/crytic-compile) · [View on PyPI](https://pypi.org/project/crytic-compile/)