OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Solgraph

Solgraph is a JavaScript command-line tool and Node module that reads Solidity contract source and generates DOT graphs of function control flow, marking function types and operations such as external sends, calls, transfers and payable functions.

Independent OpenViST project profile, based on linked sources.

Solgraph — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Install Solgraph globally with the command below.

    Documented command
    npm install -g solgraph
  2. Run solgraph MyContract.sol > MyContract.dot.

  3. 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.
Evidence and transparency

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