Solidera is an NPM package designed to help developers analyze their Solidity smart contracts for gas optimization, security bugs, and style guide adherence. With a single command, you can receive categorized insights and tips to improve the quality, security, and efficiency of your smart contract code.
- Gas Optimization: Provides tips to make your contract more gas-efficient.
- Security: Flags potential vulnerabilities in the code.
- Style Guide: Ensures that the code follows best practices for readability and maintainability.
To install Solidera, run:
npm install -g solidera
After installing, you can analyze your contract by running the following command:
solidera path/to/your/contract.sol
Replace path/to/your/contract.sol
with the path to the Solidity file you want to audit.
Solidera will analyze your contract and categorize findings into three main areas:
- Gas Optimization
- Security Bugs
- Style Guide
Each issue found will include a description, allowing you to quickly understand and address the feedback.
For a detailed explanation of the rules applied in each category, please refer to the Solidera Rules Documentation.
solidera contracts/MyContract.sol
Example output:
Gas Optimization:
- Use 'view' functions to save gas in read-only functions.
...
Security:
- Avoid re-entrancy vulnerabilities by using the 'checks-effects-interactions' pattern.
...
Style Guide:
- Function names should be in mixedCase.
...
This project is licensed under the MIT License.