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

Function Visibility Optimizer Suggester

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

Function Visibility Optimizer Suggester is a developer-focused tool that analyzes Solidity function visibility specifiers and suggests optimizations for gas efficiency and security. It takes contract source code from the user and parses all function definitions, extracting visibility specifiers (public, external, internal, private), modifiers (view, pure, payable), and usage patterns. The tool evaluates each function against a set of optimization rules and provides actionable suggestions to improve gas costs and security posture. Suggestions include converting public functions to external when appropriate, using internal instead of private for inheritable functions, using private for encapsulation, converting view to pure when possible, and identifying external functions that should be public for internal calls. Each suggestion includes the function name, current visibility, proposed change, reasoning, and severity level.

HOW TO USE

Paste your Solidity contract source code into the input area. Click "Suggest visibility optimizations" to analyze the code. The tool will display a summary showing the total number of functions and counts of optimizations, warnings, and info items. Each suggestion entry includes the function name, current visibility, a description of the suggested change, the reasoning behind the suggestion, and the line number. The report can be copied or downloaded as JSON for further analysis.

TECHNICAL NOTE: VISIBILITY ANALYSIS AND OPTIMIZATION RULES

The tool uses regex-based parsing to extract function definitions and visibility specifiers from Solidity source code. It analyzes each function based on a set of optimization rules: public functions that are never called internally should be external for gas savings; private functions that could be inherited should use internal; internal functions not intended for override should be private for encapsulation; view functions that do not read state should use pure; external functions called internally should use public. The tool also checks for overrides and virtual specifiers to avoid breaking inheritance patterns. Each suggestion is classified by severity: optimize (gas savings), warn (security/encapsulation), or info (informational).

WHAT IT CANNOT SEE

The tool cannot automatically detect all usage patterns without context; some suggestions may require manual verification. It is limited to the accuracy of the source code analysis; syntax variations may cause parsing issues. It cannot detect visibility issues in external contracts or libraries that are imported into the contract. It is limited by the parser's ability to handle Solidity syntax variations, including newer language features. It cannot suggest optimizations 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 suggestions are based on static analysis and should be verified with actual usage patterns and testing. The tool is read-only and does not modify any state. The tool provides no warranty that the suggestions are complete or accurate; users are responsible for validating all recommendations.

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.