Skip to main content

EVM cfg builder written in Python 3.

Project description

# EVM CFG BUILDER [![Build Status](]( [![Slack Status](]( [![PyPI version](](

evm-cfg-builder is used to extract a control flow graph (CFG) from EVM bytecode. It is used by Ethersplay, Manticore, and other tools from Trail of Bits. It is a reliable foundation to build program analysis tools for EVM.

We encourage contributions that address any known [issues]( and will pay out bounties for accepted PRs. Join us on the [Empire Hacking Slack]( to discuss using or extending evm-cfg-builder.

## Features

  • Reliably recovers a Control Flow Graph (CFG) from EVM bytecode using a dedicated Value Set Analysis
  • Recovers functions names
  • Recovers attributes (e.g., payable, view, pure)
  • Outputs the CFG to a dot file
  • Library API

## Usage

### Command line

To export basic dissassembly information, run: ` evm-cfg-builder mycontract.evm `

To export the CFG of each function (dot format), run: ` evm-cfg-builder mycontract.evm --export-dot my_dir `

dot files can be read using xdot.

### Library See [examples/](examples/ and [examples/](examples/ for library examples.

## How to install

### Using Pip ` $ pip install evm-cfg-builder `

### Using Git ` git clone pip install . `

## Requirements

## Getting Help

Feel free to stop by our [Slack channel]( (#ethereum) for help using or extending evm-cfg-builder.

## License

evm-cfg-builder is licensed and distributed under the AGPLv3. [Contact us]( if you’re looking for an exception to the terms.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for evm-cfg-builder, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size evm-cfg-builder-0.3.0.tar.gz (1.3 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page