Decentralized Token Exchange Platform untuk Testnet
SertSwap adalah platform decentralized exchange (DEX) yang dibangun di atas Laravel dengan integrasi Web3 menggunakan Ethers.js. Platform ini memungkinkan pengguna untuk:
- 🔄 Swap Token - Tukar token ERC-20 secara langsung menggunakan protokol Uniswap V2
- 💧 Liquidity Pools - Tambah dan kelola likuiditas untuk pasangan token
- 👛 Multi-Wallet Support - Koneksi dengan MetaMask dan wallet Web3 lainnya
- 📊 Real-time Quotes - Dapatkan harga swap secara real-time
|
|
|
|
| Layer | Technology |
|---|---|
| Backend | Laravel 11, PHP 8.2+ |
| Frontend | Blade Templates, Vanilla CSS |
| Blockchain | Ethers.js v6, Web3 Provider |
| Smart Contracts | Uniswap V2 Router, ERC-20 |
| Database | MySQL/SQLite |
- PHP 8.2+
- Composer
- Node.js & NPM
- MetaMask Extension
# Clone repository
git clone https://github.com/your-username/SertSwap.git
cd SertSwap
# Install PHP dependencies
composer install
# Install Node dependencies
npm install
# Setup environment
cp .env.example .env
php artisan key:generate
# Run migrations
php artisan migrate --seed
# Start development server
php artisan serveEdit file .env untuk konfigurasi:
# Application
APP_NAME=SertSwap
APP_URL=http://localhost:8000
# Database
DB_CONNECTION=mysql
DB_DATABASE=sertswap| Network | Chain ID | Router Contract | Explorer |
|---|---|---|---|
| Sepolia | 11155111 | Uniswap V2 | etherscan.io |
| Amoy | 80002 | QuickSwap | polygonscan.com |
SertSwap/
├── app/
│ ├── Http/Controllers/
│ │ ├── SwapController.php # Swap logic
│ │ ├── LiquidityController.php # Liquidity management
│ │ └── Api/TokenController.php # Token API
│ └── Models/
│ ├── Token.php # Token model
│ └── Pool.php # Liquidity pool model
├── public/
│ └── js/
│ └── web3-service.js # Web3 interactions
├── resources/
│ └── views/
│ ├── swap/ # Swap interface
│ ├── liquidity/ # Liquidity interface
│ └── layouts/ # App layout
└── routes/
├── web.php # Web routes
└── api.php # API routes
┌──────────────────────────────────────┐
│ 🔄 SertSwap DEX │
├──────────────────────────────────────┤
│ ┌────────────────────────────────┐ │
│ │ You Pay │ │
│ │ [1.0 ] [ETH ▼] │ │
│ │ Balance: 2.5 ETH │ │
│ └────────────────────────────────┘ │
│ ⇅ │
│ ┌────────────────────────────────┐ │
│ │ You Receive │ │
│ │ [1842.50 ] [USDC ▼] │ │
│ │ Balance: 500 USDC │ │
│ └────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────┐ │
│ │ [ Swap Now ] │ │
│ └────────────────────────────────┘ │
└──────────────────────────────────────┘
⚠️ Testnet Only: Platform ini dirancang untuk digunakan di testnet saja. Jangan gunakan untuk transaksi mainnet dengan aset nyata.
- ✅ Non-custodial - Private keys tidak pernah meninggalkan wallet Anda
- ✅ Open source - Kode dapat diaudit
- ✅ Standard ERC-20 - Menggunakan kontrak yang sudah teruji
Kontribusi sangat dihargai! Silakan:
- Fork repository
- Buat feature branch (
git checkout -b feature/AmazingFeature) - Commit perubahan (
git commit -m 'Add some AmazingFeature') - Push ke branch (
git push origin feature/AmazingFeature) - Buka Pull Request
Distributed under the MIT License. See LICENSE for more information.
Muham
- 🌐 Built with ❤️ for Web3 community
- 📧 Contact: [your-email@example.com]
⭐ Star this repo if you find it useful!