Util to facilitate smart contracts compilation.
Project description
Crytic-compile
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 hardhat
See the Configuration documentation for advanced usages.
The plugin is used in Trail of Bits tools, including:
Installation
pip3 install crytic-compile
Usage
In 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.
Library Linking
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.
As a library
See the library documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crytic_compile-0.3.11.tar.gz.
File metadata
- Download URL: crytic_compile-0.3.11.tar.gz
- Upload date:
- Size: 79.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4e2253d5d81ec3a75deb3ab9fc2c2d2db56e835001cf07f3703911d74b56716
|
|
| MD5 |
7cc1eca0a238f2c12f81b36645359ee1
|
|
| BLAKE2b-256 |
f4cb669ed02fbfe17091998f52a7e3326ac276409117ea10a2c36b2a852a22f9
|
Provenance
The following attestation bundles were made for crytic_compile-0.3.11.tar.gz:
Publisher:
publish.yml on crytic/crytic-compile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crytic_compile-0.3.11.tar.gz -
Subject digest:
d4e2253d5d81ec3a75deb3ab9fc2c2d2db56e835001cf07f3703911d74b56716 - Sigstore transparency entry: 701145520
- Sigstore integration time:
-
Permalink:
crytic/crytic-compile@46ab5fda85dc967c0896720c0c3d744bb588f8c3 -
Branch / Tag:
refs/tags/0.3.11 - Owner: https://github.com/crytic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46ab5fda85dc967c0896720c0c3d744bb588f8c3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file crytic_compile-0.3.11-py3-none-any.whl.
File metadata
- Download URL: crytic_compile-0.3.11-py3-none-any.whl
- Upload date:
- Size: 99.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10f99c5f03ab124a14603093d65e534b58f078999bc3a39997cb3588fa82f80b
|
|
| MD5 |
9a2f04f2825957f346d1a7dc0e7ff2ef
|
|
| BLAKE2b-256 |
90341f0f1e8c5d6dffa75a7b3e734f2dd2a462489b8cd5e5f9219d0d8a22a780
|
Provenance
The following attestation bundles were made for crytic_compile-0.3.11-py3-none-any.whl:
Publisher:
publish.yml on crytic/crytic-compile
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crytic_compile-0.3.11-py3-none-any.whl -
Subject digest:
10f99c5f03ab124a14603093d65e534b58f078999bc3a39997cb3588fa82f80b - Sigstore transparency entry: 701145522
- Sigstore integration time:
-
Permalink:
crytic/crytic-compile@46ab5fda85dc967c0896720c0c3d744bb588f8c3 -
Branch / Tag:
refs/tags/0.3.11 - Owner: https://github.com/crytic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46ab5fda85dc967c0896720c0c3d744bb588f8c3 -
Trigger Event:
release
-
Statement type: