Skip to content

Imports graph printer#

Name: imports-graph

Generates an imports graph of Solidity source files into a Graphviz .dot file.

Example#

Imports graph contracts/types/PoolId.sol contracts/types/PoolId.sol contracts/PoolManager.sol contracts/PoolManager.sol contracts/types/PoolId.sol->contracts/PoolManager.sol contracts/interfaces/IPoolManager.sol contracts/interfaces/IPoolManager.sol contracts/types/PoolId.sol->contracts/interfaces/IPoolManager.sol contracts/types/PoolKey.sol contracts/types/PoolKey.sol contracts/types/PoolKey.sol->contracts/types/PoolId.sol contracts/interfaces/IHooks.sol contracts/interfaces/IHooks.sol contracts/types/PoolKey.sol->contracts/interfaces/IHooks.sol contracts/interfaces/IPoolManager.sol->contracts/PoolManager.sol contracts/interfaces/IPoolManager.sol->contracts/interfaces/IHooks.sol contracts/interfaces/IDynamicFeeManager.sol contracts/interfaces/IDynamicFeeManager.sol contracts/interfaces/IPoolManager.sol->contracts/interfaces/IDynamicFeeManager.sol contracts/libraries/LockDataLibrary.sol contracts/libraries/LockDataLibrary.sol contracts/interfaces/IPoolManager.sol->contracts/libraries/LockDataLibrary.sol contracts/types/Currency.sol contracts/types/Currency.sol contracts/types/Currency.sol->contracts/types/PoolKey.sol contracts/interfaces/IHooks.sol->contracts/types/PoolKey.sol contracts/interfaces/IDynamicFeeManager.sol->contracts/PoolManager.sol contracts/Fees.sol contracts/Fees.sol contracts/interfaces/IDynamicFeeManager.sol->contracts/Fees.sol contracts/libraries/LockDataLibrary.sol->contracts/PoolManager.sol contracts/interfaces/external/IERC20Minimal.sol contracts/interfaces/external/IERC20Minimal.sol contracts/interfaces/external/IERC20Minimal.sol->contracts/types/Currency.sol contracts/types/BalanceDelta.sol contracts/types/BalanceDelta.sol contracts/types/BalanceDelta.sol->contracts/interfaces/IHooks.sol contracts/Fees.sol->contracts/PoolManager.sol

Parameters#

Command-line name TOML name Type Default value Description
--out out str .wake/imports-graphs.dot Output file path.
--graph-direction graph_direction Choice of TB, BT, LR, RL TB Direction of the graph.
--edge-direction edge_direction Choice of imported-to-importing, importing-to-imported imported-to-importing Direction of the edges.
--links links bool True Whether to generate links to the source code.
--force force bool False Whether to overwrite existing files.
--importers/
--no-importers
importers bool True Whether to generate files importing the specified files.
--imported/
--no-imported
imported bool True Whether to generate files imported by the specified files.