The Solhint Prettier plugin allows you to connect the Prettier formatting rules to the Solhint linter.Used as a Solidity linter, Solhint detects a wide array of validation and security rules in compliance with Solidity’s style guide. Prettier is an extremely popular style checker for Javascript with over 100k npmdownloads per month, and provides preset and custom rules forformatting. Combined, Solhint with Prettier is an effective, consistent methodfor contract formatting and linting.
Prodct Categories: Static Analysis Tools
Rattle
Developed by Crytic, the blockchain arm of Trail Of Bits, Rattle provides astatic analysis framework for deployed smart contracts. Developers can use Rattle to parse EVM bytestrings to obtain a control flowgraph for the set of contracts. Rattle then uses this flow graph to optimize theSSA instructions. This optimization results in ~60% of all EVM instructions being trimmed,creating a friendly interface for those users who wish to read the contract they are interacting with!
Ethlint
Ethlint is a tool that analyzes your Solidity code to check for style and security best practices; when it finds an issue, it fixes it for you.Developers can use Ethlint’s command line interface to lint over theircontracts, integrate Ethlint with their favorite IDE’s, or extend itsfunctionality using its plugins.Ethlint is a Solidity linter with some 30 contributors and comprehensive documentation for contribution to, modification of, and experimentation with theEthlint tool.
Solhint
Solhint is developed by Protofire and has been maintained since 2017, seeing V2and – its current – V3 releases.Used as a Solidity linter, Solhint detects a wide array of validation and security rules in compliance with Solidity’s style guide. Solhint comes with preconfigured sets of rules but allows the developer tochange these rule sets, as well as manage configuration rules at the code levelwith specific comments.
Amarna
Developed by Crytic, the blockchain arm of Trail Of Bits, Amarna is a static analyzer for Cairo. Used by applications such as dYdX, Cairo is a language usedto write “provable programs”.Amarna allows developers to search for custom code patterns as well as abuilt-in set of vulnerability flags and supports the creation of local andglobal rules for analysis.Notably, Amarna can directly parse StarkNet contracts, and export analysisresults to VSCode in the SARIF format.
Solhint for IntelliJ
Solhint for IntelliJ allows developers to plug Solhint into their IntelliJ IDE for easy testing and linting of Solidity contracts with javascript.Used as a Solidity linter, Solhint detects a wide array of validation and security rules in compliance with Solidity’s style guide. Solhint comes with preconfigured sets of rules, but allows the developer tochange these rule sets, as well as manage configuration rules at the code levelwith specific comments.
Slither
Slither is a contract security framework written in Python and first conceived in a 2019 paper from Josselin Feist, Gustavo Grieco, and Alex Groce. The Slither framework provides automated vulnerability and optimization detection, as well as assistive codebase summaries to further developer comprehension. Born of Cryptic, the blockchain security arm of Trail of Bits, Slither is Hardhat and Truffle compatible, and operational for Solidity code written in V0.4 onwards.