No description
- Perl 62.3%
- Python 36.1%
- Vim Script 1.6%
| data | ||
| scripts | ||
| vim | ||
| .gitignore | ||
| README.md | ||
EVM Opcode Analysis
Codex authorship notice: All code and documentation in this repository were written by Codex using GPT-5.6-Sol.
Motivation
This tool provides improved UI/UX for foundry debug in Foundry.
What this repository does
This repository turns Ethereum contract bytecode and transaction traces into readable, source-annotated opcode listings. It can inspect memory at a specific execution step, generate static and context-sensitive control-flow graphs, and highlight the path a transaction took through a contract.
Main tools
Render a contract
perl scripts/render_contract.pl CONTRACT_ADDRESS [CONTRACT_ADDRESS ...]
Render transaction traces
perl scripts/render_tx_trace.pl TX_HASH [TX_HASH ...]
Dump transaction memory
perl scripts/dump_tx_memory.pl TX_HASH CALL_DEPTH PC [RPC_URL]
Display it with opcode-based ANSI colours
vim -S vim/tx-highlights.vim data/tx/tx-0x4577__89a8-pretty.txt
vim -S vim/contract-highlights.vim data/contracts/contract-0x28ce__6d5d-pretty.txt
CFG tools
Generate static control-flow graphs
python3 scripts/cfg/generate_static_cfg.py data/contracts/contract-*-pretty.txt
Analyze context-sensitive paths
python3 scripts/cfg/analyze_context_paths.py data/contracts/contract-*-pretty.txt
Highlight a transaction path in a control-flow graph
python3 scripts/cfg/highlight_transaction_cfg.py CFG_DOT TRACE_TXT CONTRACT_ADDRESS