Practical overview
When it fits
Use Solgraph when you want a visual representation of Solidity function control flow to support contract review, or when a developer tool needs DOT output from Solidity source.
Who it is for
- Solidity developers reviewing function flows and contract operations.
- Security reviewers using visualizations as one part of smart-contract analysis.
- JavaScript tool builders who want to generate Solidity control-flow DOT output in a Node workflow.
Documented uses
- Generate a DOT graph from a Solidity contract file.
- Trace function relationships and identify marked operations in a contract visualization.
- Render DOT output as an image using Graphviz.
- Generate DOT from Solidity source within a Node.js program.
Requirements & limits
The public GitHub repository identifies the project as open source under the ISC license.
- Solgraph generates DOT; Graphviz is separately needed to render the graph as an image.
- The generated graph marks function types and operations, but the project describes these as potential security-vulnerability indicators for analysis.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Generate and render a Solidity control-flow graph
Create a DOT graph from a contract file and render it as a PNG image.
Before you start
- Solgraph installed with npm
- A Solidity contract source file
- Graphviz installed to render the DOT file
Steps
Install Solgraph globally with the command below.
npm install -g solgraphRun
solgraph MyContract.sol > MyContract.dot.Render the graph with
dot -Tpng MyContract.dot -o MyContract.png.
Expected outcome
A PNG image rendered from Solgraph's DOT representation of the contract's function control flow.
Guide limitations
- Graphviz is required for image rendering; Solgraph generates the DOT graph.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- raineorshine/solgraph · Official homepage title · retained in its source language

