You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the [Configuration](https://github.com/crytic/crytic-compile/wiki/Configuration) documentation for advanced usages.
20
26
21
27
The plugin is used in Trail of Bits tools, including:
@@ -27,21 +33,33 @@ The plugin is used in Trail of Bits tools, including:
27
33
28
34
## Installation
29
35
30
-
```bash
36
+
```shell
31
37
pip3 install crytic-compile
32
38
```
33
39
34
40
## Usage
35
41
36
-
### Standalone
37
-
```bash
42
+
In the root directory of your project e.g. same directory as `hardhat.config.js` or `foundry.toml`, run:
43
+
44
+
```shell
38
45
crytic-compile .
39
46
```
40
47
41
48
Crytic-compile will generate `crytic-export/contracts.json` containing the AST/ABI and bytecodes of the contracts.
42
49
43
50
Run `crytic-compile --help` for more options.
44
51
52
+
## Library Linking
53
+
54
+
If your project uses [libraries](https://docs.soliditylang.org/en/latest/contracts.html#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:
If you are fuzzing with Echidna or Medusa, follow this [tutorial on linking libraries](https://secure-contracts.com/program-analysis/echidna/advanced/working-with-libraries.html?highlight=library#linking-libraries).
62
+
45
63
### As a library
46
64
47
65
See the [library documentation](https://github.com/crytic/crytic-compile/wiki/Library-Documentation).
0 commit comments