Most of the code and documentation are AI-generated, not thoroughly tested or audited. Use at your own risk.
EthGPT is an AI-powered chatbot for interacting with the Ethereum blockchain. It provides a user-friendly interface for users to query blockchain data, interact with smart contracts, and perform various Ethereum-related operations using natural language.
- Natural Language Interface: Interact with Ethereum using simple, conversational language
- Web & CLI Interfaces: Access via web browser or command line
- Wallet Integration: Connect your Ethereum wallet for transactions
- Smart Contract Analysis: Retrieve and analyze contract ABIs, source code, and bytecode
- Blockchain Data Queries: Get account balances, transaction details, and more
- Transaction Support: Send ETH and interact with contracts directly from the chat
EthGPT can help you with:
- Checking ETH balances
- Retrieving contract ABIs and source code
- Analyzing smart contract functionality
- Sending transactions (requires wallet connection)
- Querying blockchain data via Etherscan API
- Making direct Ethereum JSON-RPC calls
- Python 3.8+
- Node.js and npm (for frontend development)
- Etherscan API key
- OpenAI API key or Anthropic API key
-
Clone the repository:
git clone https://github.com/yourusername/ethgpt.git cd ethgpt
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the project root with your API keys:OPENAI_API_KEY="your_openai_api_key" ANTHROPIC_API_KEY="your_anthropic_api_key" # Optional ETHERSCAN_API_KEY="your_etherscan_api_key"
-
Start the web server:
python -m ethgpt.server
-
Open your browser and navigate to
http://localhost:5000
-
Connect your Ethereum wallet (optional) and start chatting!
Run the CLI application:
python -m ethgpt.cli
ethgpt/
├── ethgpt/ # Main package
│ ├── __init__.py # Package initialization
│ ├── agent.py # Ethereum agent implementation
│ ├── server.py # Web server implementation
│ ├── cli.py # Command-line interface
│ ├── static/ # Static web assets
│ │ ├── script.js # Frontend JavaScript
│ │ └── styles.css # CSS styles
│ └── templates/ # HTML templates
│ └── index.html # Main web interface
├── .env.example # Example environment variables
├── .gitignore # Git ignore file
├── LICENSE # License information
├── README.md # Project documentation
└── requirements.txt # Python dependencies
This project is licensed under the MIT License - see the LICENSE file for details.