Skip to content

fkworkau/web3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web3 Drainer Application

A comprehensive Web3 application for token detection, authorization, and transfer management across multiple blockchain networks.

🏗️ Project Structure

Drain_app/
├── Client/          # Frontend application
├── Server/          # Backend API server
├── Contract/        # Smart contracts
├── scripts/         # Utility scripts
├── tasks/           # Task management
└── docker-compose.yml

🚀 Quick Start

Prerequisites

  • Node.js >= 18.0.0
  • npm >= 9.0.0
  • Docker (optional)

Installation

# Install all dependencies
npm run install:all

# Or install individually
npm run install:client
npm run install:server
npm run install:contracts

Development

# Start all services
npm start

# Start individual services
npm run start:server    # Backend on port 3000
npm run start:client    # Frontend on port 8080
npm run start:contracts # Local blockchain on port 8545

Building

# Build all
npm run build

# Build individually
npm run build:client
npm run build:contracts

📁 Components

Client (Frontend)

  • Technology: Vanilla JS, Web3Modal, Ethers.js
  • Features: Wallet connection, token detection UI, transfer authorization
  • Port: 8080

Server (Backend)

  • Technology: Node.js, Express.js, Ethers.js
  • Features: API endpoints, wallet authentication, transaction management
  • Port: 3000

Contract (Smart Contracts)

  • Technology: Solidity, Hardhat, OpenZeppelin
  • Features: Utility contracts, batch operations, gas optimization

🔧 Configuration

Environment Variables

Create .env files in each directory:

Server/.env

PORT=3000
ETHEREUM_RPC_URL=your_ethereum_rpc_url
SEPOLIA_RPC_URL=your_sepolia_rpc_url
PRIVATE_KEY=your_private_key

Contract/.env

PRIVATE_KEY=your_private_key
ETHERSCAN_API_KEY=your_etherscan_api_key
SEPOLIA_RPC_URL=your_sepolia_rpc_url
ETHEREUM_RPC_URL=your_ethereum_rpc_url

🧪 Testing

# Test all
npm test

# Test individually
npm run test:server
npm run test:client
npm run test:contracts

🚢 Deployment

Local Development

npm run deploy:local

Testnet (Sepolia)

npm run deploy:sepolia

Docker

npm run docker:build
npm run docker:up

📚 API Documentation

Server Endpoints

  • GET /api/status - API status and health check
  • GET /api/blockchain/networks - Available networks
  • POST /api/wallet/connect - Wallet connection
  • GET /api/tokens/scan/:address - Token scanning
  • POST /api/transfer/prepare - Transfer preparation

🔒 Security Features

  • Rate limiting
  • Input validation
  • CSRF protection
  • Secure session management
  • Audit logging

🛠️ Development Tools

  • Task Management: Taskmaster-AI
  • Linting: ESLint
  • Testing: Jest
  • Building: Webpack, Hardhat
  • Containerization: Docker

📄 License

MIT License

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

📞 Support

For support and questions, please open an issue in the repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published