Skip to content

VinuSoftware/minimal-proxy

Repository files navigation

Sepolia Deposit System

A modern, minimal proxy-based deposit system for the Sepolia testnet. This project provides a decentralized, gas-efficient infrastructure for exchange-style deposit management, featuring automatic wallet creation, token collection, and a user-friendly web interface.

Features

  • Minimal Proxy (CREATE2) Wallets: Deterministic, low-cost wallet deployment for each user.
  • Multi-Token Support: Easily add and manage test tokens like USDT and USDC.
  • Batch Token Collection: Admin can collect tokens from multiple user wallets in a single transaction.
  • User Management: Create users, deploy wallets, and view user-specific information.
  • Web Interface: Connect your wallet, manage users, and interact with the system on Sepolia testnet.
  • Admin Controls: Add supported tokens, change admin, and perform emergency withdrawals.

Quick Start

Requirements

  • Node.js & npm
  • Hardhat
  • Sepolia testnet wallet & test ETH

Installation

git clone <repo-url>
cd minimal-proxy
npm install

Deployment (Sepolia)

Add your Sepolia RPC and private key to a .env file:

SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR-PROJECT-ID
PRIVATE_KEY=0x...

Deploy contracts to Sepolia:

npx hardhat deploy-sepolia

Testing

npx hardhat test

Web Interface

Open scripts/index.html in your browser. Connect your wallet (MetaMask, Sepolia testnet) and interact with the system.

Smart Contracts

  • DepositWalletFactory: Manages users, wallet deployment, and token collection.
  • WalletImplementation: Minimal proxy wallet logic for each user.
  • TestToken: Simple ERC20 for USDT/USDC testing on Sepolia.

Usage Scenarios

  • Create User: Reserve a wallet address for a new user ID.
  • Deploy Wallet: Wallet is deployed automatically on first token transfer or admin action.
  • Collect Tokens: Admin can sweep tokens from user wallets to the admin address.
  • Statistics & Tracking: View total users, deployed wallets, and collected tokens via the web UI.

Developer Notes

  • 100% open source, for educational and testnet use only.
  • Easily extendable for new tokens or features.
  • Use addSupportedToken as admin to add new tokens.

Contributing & License

Contributions are welcome! See LICENSE for details.

About

minimal-proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published