Created by @federicobond extended by @GNSPS
A set of utilities for inspecting the structure of Solidity contracts.
The name stems from the sun deity Surya
Why the sun, you ask? Because "sun" in latin and portuguese is Sol.
Install it via npm:
npm install -g surya
The describe
command shows a summary of the contracts and methods in the files provided.
surya describe MyContract.sol
The graph
command outputs a DOT-formatted graph of the control flow.
surya graph MyContract.sol | dot -Tpng > MyContract.png
The parse
command outputs a "treefied" AST object coming from the parser.
surya parse MyContract.sol
The ftrace
command outputs a "treefied" function call trace stemming from the defined "CONTRACT::FUNCTION" and traversing "all|internal|external" types of calls.
surya ftrace APMRegistry::_newRepo all MyContract.sol
GPL-3.0