Contract Call Depth Profiler
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
This tool profiles contract call depth and internal call patterns by analyzing transaction traces, gas usage, and function call hierarchies. It provides a comprehensive view of how functions call each other within a contract, showing the depth of nested calls, gas consumption at each level, and call path patterns. The profiler analyzes historical transaction data to extract call trees, identifying which functions are called, how deeply they nest, and the gas costs associated with each call path. Results are presented as a detailed profile with call path visualizations, depth metrics, gas usage statistics, and status indicators. This is essential for developers optimizing gas usage, auditors understanding contract execution flow, and teams identifying potential stack depth vulnerabilities.
HOW TO USE
Connect your wallet (read-only, no transaction required) and select the target network. Enter the contract name and address, optionally provide a sample transaction hash for detailed trace analysis, and set the lookback blocks for call pattern analysis. Click "profile call depth" and the tool will verify the contract, fetch transaction data and traces, and analyze call patterns. Results display a summary with total call paths identified, detailed call cards showing each function call path with depth, gas usage, and status, and a table of all profiled calls. Use the report to identify deep call chains, optimize gas-heavy paths, and understand contract execution behavior.
TECHNICAL MECHANISM
The analyzer uses ethers.js v5.7.2 to perform a multi-stage call depth profiling. First, it calls eth_getCode to verify the contract is deployed and uses block explorer APIs to fetch verification status and ABI. The tool then retrieves transaction data for the contract using eth_getLogs and eth_getTransactionReceipt across the specified block range. If a sample transaction hash is provided, it attempts to use debug_traceTransaction (when available) to capture detailed internal call traces, including all nested calls, their depth, and gas usage. For each call path identified, the tool constructs a call tree, tracking the depth of each call (with the root call at depth 1). It extracts gas consumption data from transaction receipts and traces, and calculates the gas used at each call level. The tool also maps function signatures from the ABI to human-readable function names where possible. Each call path is assigned a status (ok, warn, bad) based on depth thresholds (depth > 4 triggers warn, depth > 8 triggers bad) and gas usage patterns. Results are compiled into a structured profile with detailed call path information, depth metrics, and gas statistics.
WHAT IT CANNOT SEE
This tool cannot profile contracts that are not verified or have opaque implementation details where function signatures cannot be resolved. It is limited by the RPC provider's rate limits and availability of debug_traceTransaction, which may be restricted on some providers (e.g., rate-limited, disabled, or only available for archival nodes). It cannot capture call depth for transactions that have not been executed or are pending. The analysis relies on the accuracy and completeness of transaction trace data and contract verification; incomplete traces or missing transaction data may produce incomplete profiles. It cannot analyze call depth patterns for contracts that use delegatecall or proxy patterns without full trace data, as these patterns may obscure the actual call hierarchy. The tool is limited to the specific transactions and contract instances that are accessible via RPC. It cannot guarantee that profiling captures all possible call paths or edge cases without exhaustive transaction analysis across a large number of transactions. The depth thresholds are heuristic and may need adjustment for specific contract patterns.
PLEASE NOTE
This is a read‑only analytics tool—it never submits transactions or modifies contract state. It is designed for EVM‑compatible chains and works best with verified contracts and providers that support debug_traceTransaction. The profiling results are for informational and optimization purposes only and should not be considered a comprehensive security audit. Always verify call depth patterns against actual contract behavior and test edge cases. The tool's depth thresholds are configurable and may need adjustment based on your specific contract's call patterns.