Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.58 KB

README.md

File metadata and controls

45 lines (30 loc) · 1.58 KB

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

Installation

# 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 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).