π IAcine Smart Contract Analyzer | AI-Powered Ethereum Code Audit with RAG
π Introduction
IAcine Smart Contract Analyzer is a powerful AI tool that analyzes Ethereum smart contracts directly from their source code. Using RAG (Retrieval-Augmented Generation), OpenAIβs GPT, and a modern Streamlit interface, it generates clean summaries, functional insights, and answers to any question you ask β all based on the real Solidity code.
Whether youβre a blockchain developer, an auditor, or a business working with tokens and DeFi, this app turns code complexity into clarity. π€π
π Features
βοΈ Etherscan Integration β Fetch smart contract code from any Ethereum address
βοΈ CoinMarketCap-style Summaries β Auto-generate project descriptions
βοΈ Feature Detection β Detects blacklist, pause, mint, burn, ownership, and upgradeability
βοΈ Ask Anything with RAG β Get AI answers based on the actual Solidity code
βοΈ PDF Report Export β Download a clean, structured audit-style report
βοΈ Streamlit Web App β User-friendly, no-code frontend to interact with AI
ποΈ Technologies
- π Python 3.12 β App logic and backend
- π§ OpenAI GPT β Large Language Model for summaries and QA
- π LangChain + FAISS β Retrieval-Augmented Generation pipeline
- π Streamlit β Lightweight frontend framework
- π Etherscan & CoinGecko API β For source code and market data
- π FPDF β Exporting structured audit-style PDFs
- π‘οΈ dotenv β Secure API key management
π¦ Installation
=== 1οΈβ£ Clone the Repository
git clone https://github.com/Yacine-Mekideche/smart_contract_blockchain.git
cd smart_contract_blockchain
=== 2οΈβ£ Create a .env
File
OPENAI_API_KEY=your_openai_api_key
ETHERSCAN_API_KEY=your_etherscan_api_key
=== 3οΈβ£ Set Up Your Environment
python -m venv venv
# Activate:
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
=== 4οΈβ£ Install Dependencies
pip install -r requirements.txt
βΆοΈ Running the App
Start the app with:
streamlit run app.py
Then open the Streamlit UI in your browser. You can:
- π Paste a smart contract address (e.g.,
0xdAC17F958D2ee523a2206206994597C13D831ec7
) - π Or upload a
.sol
file directly - β Get badges, summaries, and ask your own questions
- π Export a PDF report
π― Demo
π§ AI Architecture Overview
- Input β Ethereum address or uploaded Solidity file
- Source Code β Retrieved via Etherscan or Streamlit uploader
- RAG Pipeline β FAISS + LangChain + OpenAI
- Outputs:
- Project Summary
- Functional Badges
- AI-Powered Q&A
- PDF Report
π¬ Contact Me
π‘ Into AI + Blockchain? Letβs build the future together.
π© Business inquiries: contact@iacine.tech
#SmartContracts #AI #Ethereum #RAG #LangChain #GPT #Solidity #Audit #Streamlit #OpenAI #DeFi #BlockchainSecurity #YacineTech #FreelanceAI #PythonProject