https://github.com/malik672/gas-analyzer
The gas-analyzer is a tool for Ethereum developers seeking to enhance the efficiency and gas optimization of their Solidity code by Leveraging pattern matching and AST analysis, it discovers potential optimizations to boost efficiency
https://github.com/malik672/gas-analyzer
code-analysis developer-tools gas-optimization rust smart-contracts static-analysis
Last synced: 4 months ago
JSON representation
The gas-analyzer is a tool for Ethereum developers seeking to enhance the efficiency and gas optimization of their Solidity code by Leveraging pattern matching and AST analysis, it discovers potential optimizations to boost efficiency
- Host: GitHub
- URL: https://github.com/malik672/gas-analyzer
- Owner: malik672
- License: mit
- Created: 2023-10-26T19:19:19.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T11:29:21.000Z (over 1 year ago)
- Last Synced: 2024-05-29T17:28:18.227Z (over 1 year ago)
- Topics: code-analysis, developer-tools, gas-optimization, rust, smart-contracts, static-analysis
- Language: Rust
- Homepage:
- Size: 233 KB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
# Gas Analyzer
## Overview
Gas Analyzer is a static analysis tool designed to optimize Solidity smart contracts by analyzing gas consumption patterns. Leveraging Abstract Syntax Tree (AST) parsing and regular expressions, this tool identifies potential gas inefficiencies and provides insights into optimizing your Ethereum smart contracts.
## Features
- **Gas Inefficiency Detection**: Identify code patterns that may lead to higher gas consumption.
- **Optimization Recommendations**: Offer suggestions for optimizing gas usage in Solidity contracts.
- **AST Parsing**: Utilize Abstract Syntax Tree parsing for deeper analysis of contract structures.
## Getting Started
### Prerequisites
- [Rust](https://www.rust-lang.org/tools/install)
- [Solidity Compiler](https://docs.soliditylang.org/en/latest/installing-solidity.html) (for contract compilation)
### Installation
```bash
# Clone the Gas Analyzer repository
git clone https://github.com/malik/gas-analyzer.git
# Change into the project directory
cd gas-analyzer
# Build the project
cargo build --release
# Usage
- to change the contract code
- navigate to src
- rewrite the contract.sol file to your choice
- after run `cargo build` then `cargo run ` in your project terminal
```
## License
This project is licensed under the MIT License - see the [LICENSE.md](https://chat.openai.com/c/LICENSE.md) file for details.
## Acknowledgments
The Gas Analyzer project draws inspiration from 4nalyser and builds upon the work of the Ethereum development community and rareskills gas-optimization book(currently implementing some tricks from the book).