Skip to content

crytic/crytic-compile

Repository files navigation

Crytic-compile

Build Status Slack Status PyPI version

Library to help smart contract compilation. It includes support for:

See the Configuration documentation for advanced usages.

The plugin is used in Crytic tools, including:

Installation

pip install crytic-compile

Usage

Standalone

$ crytic-compile .

Crytic-compile will generate crytic-export/contracts.json containing the AST/ABI and bytecodes of the contracts. The file structure is:

{
    "asts": [],
    "contracts": {
        "contract_name": {
            "abi": [],
            "bin": "..",
            "bin-runtime": "..",
            "srcmap": "..",
            "srcmap-runtime": "..",
            "filenames": {
                "absolute": "..",
                "relative": "..",
                "short": "..",
                "used": "..",
            }
        }
    },
    "compiler": {
        "compiler": "solc",
        "version": "x.x.x",
        "optimized": false
    },
    "working_dir": ".."
}

Run crytic-compile --help for more options.

As a library

See the library documentation.