Skip to content

Control flow graph printer#

Name: control-flow-graph

Generates control flow graphs of functions and modifiers into Graphviz .dot files.

Example#

PoolManager._accountDelta(Currency,int128) control flow graph 89 92 return; 89->92 delta == 0 is true 95 address locker = lockData.getActiveLock() int256 current = currencyDelta[locker][currency] int256 next = current + delta 89->95 delta == 0 is false 90 success 91 revert 92->90 always 96 lockData.nonzeroDeltaCount-- 95->96 next == 0 is true 98 95->98 next == 0 is false 103 currencyDelta[locker][currency] = next 96->103 always 99 lockData.nonzeroDeltaCount++ 98->99 current == 0 is true 98->103 current == 0 is false 99->103 always 103->90 always

Parameters#

Command-line name TOML name Type Default value Description
--name (multiple) names List[str] [] Names of functions and modifiers to generate control flow graphs for.
--out out str .wake/control-flow-graphs Output directory path.
--direction direction Choice of TB, BT, LR, RL TB Direction of the graph.
--links links bool True Whether to generate links to the source code.
--force force bool False Whether to overwrite existing files.