shafu0x / contract-vis

Visualize smart contracts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

contract-vis

Visualize smart contracts.

By plotting the raw bytecode as bytes one can generate some interesting visualizations of a smart contract. Like this:

image image

Contracts, as expected, look very similar to x86 or arm64 executables.

Inspired by this

How it works

Given a file of raw bytecode: 6080F3A2...

Plot each pair on a 2D plane like this:

  1. 60-80
  2. 80-F3
  3. F3-A2

and so on....

My explanation in a bit more detail can be found here

How to use

python 2d.py [path to dir]
python 3d.py [path to file]

see run.sh for example

About

Visualize smart contracts.


Languages

Language:Python 94.6%Language:Shell 5.4%