Inheritance Chain Resolver for Debugging
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Inheritance Chain Resolver for Debugging is a developer-focused tool that resolves and visualizes Solidity inheritance chains from contract source code. It takes contract source code and an optional target contract name from the user, then parses the code to extract all contract definitions and their inheritance declarations. The tool builds a complete inheritance map showing which contracts inherit from which base contracts, and visualizes the inheritance hierarchy as a tree with color-coded nodes: root contracts (green), intermediate contracts (teal), and leaf contracts (amber). For each contract, the tool displays its full inheritance chain, including all base contracts and their relationships. The tool also shows the inheritance map for all contracts in the source. This enables developers to understand complex inheritance structures, debug diamond inheritance issues, and verify that the inheritance order matches the intended design.
HOW TO USE
Paste your Solidity contract source code into the input area. Optionally, enter a specific contract name to analyze; leave empty to analyze all contracts. Click "Resolve inheritance" to process the code. The tool will display a summary showing the total number of contracts found and the number analyzed. Each contract is displayed with its inheritance chain, showing the contract name and its base contracts in a tree structure. The inheritance map shows all relationships for quick reference. The data can be copied or downloaded as JSON.
TECHNICAL NOTE: CONTRACT PARSING AND INHERITANCE RESOLUTION
The tool uses regex-based parsing to extract contract definitions and inheritance declarations from Solidity source code. It detects contract definitions using patterns like "contract Name is Base1, Base2" and extracts the base contract names. The tool tracks brace depth to correctly identify contract boundaries and handles nested contracts. For each contract, the tool builds a complete inheritance chain by recursively resolving base contracts. The tool also handles multiple inheritance by listing all base contracts in the order they appear. The inheritance tree is constructed by starting from the root contract and traversing down to leaf contracts, with indentation levels indicating depth. The tool also detects potential diamond inheritance patterns where a contract inherits from multiple paths to the same base.
WHAT IT CANNOT SEE
The tool cannot automatically resolve inheritance without source code. It is limited to the accuracy of the provided source code analysis; syntax variations may cause parsing errors. It cannot handle complex inheritance patterns with diamond dependencies where the same base contract appears multiple times in the inheritance graph. The tool is limited by the parser's ability to handle Solidity syntax variations, including newer language features. It cannot resolve inheritance for non-EVM chains.
PLEASE NOTE
This tool is designed exclusively for Solidity contracts on EVM-compatible chains. It does not support other smart contract languages. The resolution is based on static analysis of the source code and may not capture runtime inheritance behavior such as virtual function dispatch. The tool is read-only and does not execute the contract. Always verify the resolved inheritance chain against the actual contract behavior. The tool provides no warranty that the resolution is complete or accurate; users should verify with additional tools and testing.