Skip to content

Inheritance graph printer#

Name: inheritance-graph

Generates inheritance graphs of contracts into Graphviz .dot files.

Example#

PoolManager inheritance graph contracts/PoolManager.sol_PoolManager PoolManager contracts/interfaces/IPoolManager.sol_IPoolManager IPoolManager contracts/PoolManager.sol_PoolManager->contracts/interfaces/IPoolManager.sol_IPoolManager contracts/Fees.sol_Fees Fees contracts/PoolManager.sol_PoolManager->contracts/Fees.sol_Fees contracts/NoDelegateCall.sol_NoDelegateCall NoDelegateCall contracts/PoolManager.sol_PoolManager->contracts/NoDelegateCall.sol_NoDelegateCall lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol_ERC1155 ERC1155 contracts/PoolManager.sol_PoolManager->lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol_ERC1155 lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol_IERC1155Receiver IERC1155Receiver contracts/PoolManager.sol_PoolManager->lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol_IERC1155Receiver contracts/interfaces/IFees.sol_IFees IFees contracts/interfaces/IPoolManager.sol_IPoolManager->contracts/interfaces/IFees.sol_IFees lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol_IERC1155 IERC1155 contracts/interfaces/IPoolManager.sol_IPoolManager->lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol_IERC1155 contracts/Fees.sol_Fees->contracts/interfaces/IFees.sol_IFees contracts/Owned.sol_Owned Owned contracts/Fees.sol_Fees->contracts/Owned.sol_Owned lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol_ERC1155->lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol_IERC1155 lib/openzeppelin-contracts/contracts/utils/Context.sol_Context Context lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol_ERC1155->lib/openzeppelin-contracts/contracts/utils/Context.sol_Context lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol_ERC165 ERC165 lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol_ERC1155->lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol_ERC165 lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol_IERC1155MetadataURI IERC1155MetadataURI lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol_ERC1155->lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol_IERC1155MetadataURI lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol_IERC165 IERC165 lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol_IERC1155Receiver->lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol_IERC165 lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol_IERC1155->lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol_IERC165 lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol_ERC165->lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol_IERC165 lib/openzeppelin-contracts/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol_IERC1155MetadataURI->lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155.sol_IERC1155

Parameters#

Command-line name TOML name Type Default value Description
--name (multiple) names List[str] [] Names of contracts to generate inheritance graphs for.
--out out str .wake/inheritance-graphs Output directory path.
--direction direction Choice of TB, BT, LR, RL BT 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.
--children children bool True Whether to generate children of selected contracts.
--parents parents bool True Whether to generate parents of selected contracts.
--interfaces interfaces bool True Whether to generate interfaces.
--single-file/
--multiple-files
single_file bool True Whether to generate a single file or multiple files per contract.