This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Modifier Execution Order Visualizer

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Modifier Execution Order Visualizer is a developer-focused tool that visualizes the execution order of Solidity modifiers in smart contracts. It takes contract source code and an optional target function from the user, then parses the code to extract modifier definitions, function definitions, and modifier usage. For each function (or a specific target function), the tool builds a visual execution chain showing the sequence from function entry through each modifier to the function body. Each step is displayed with color-coded indicators: entry point (green), modifiers (amber), and exit/body (teal). The tool also extracts modifier bodies and shows them alongside the visualization, with the `_;` placeholder highlighted. This enables developers to understand the execution flow of modifiers, debug complex modifier chains, and verify that modifiers are applied in the correct order.

HOW TO USE

Paste your Solidity contract source code into the input area. Optionally, enter a specific function name to analyze; leave empty to visualize all functions. Click "Visualize modifier order" to process the code. The tool will display a summary showing the total number of functions, functions analyzed, and modifiers found. Each function is displayed with its execution chain, showing the entry point, each modifier in order, and the function body exit. Modifier bodies are shown below each visualization for context. The data can be copied or downloaded as JSON.

TECHNICAL NOTE: SOLIDITY PARSING AND CHAIN CONSTRUCTION

The tool uses regex-based parsing to extract modifier definitions (modifier name(params) { ... }), function definitions, and modifier usage from function signatures. It tracks brace depth to correctly capture modifier and function bodies. For each function, the tool identifies the modifiers used in the function signature (e.g., function transfer(address to, uint amount) public onlyOwner whenNotPaused { ... }). The execution chain is constructed by starting with the function entry, then adding each modifier in order, and ending with the function body. The tool also extracts the body of each modifier to show the presence of the `_;` placeholder, which indicates where execution continues to the next modifier or the function body.

WHAT IT CANNOT SEE

The tool cannot automatically extract modifier order 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 or multiple inheritance where modifier order is affected by inheritance order. The tool is limited by the parser's ability to handle Solidity syntax variations, including newer language features. It cannot visualize modifier execution 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 visualization is based on static analysis of the source code and may not capture runtime behavior such as modifier revert conditions or early returns. The tool is read-only and does not execute the contract. Always verify the visualized order against the actual contract behavior. The tool provides no warranty that the visualization is complete or accurate; users should verify with additional tools and testing.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.