An interactive FCT token miner with real-time dashboard interface for both mainnet and Sepolia testnet.
-
Install Dependencies
pnpm install
-
Configure Wallet
- Add your private key to
.envfile:
PRIVATE_KEY=0x... # Your wallet private key NETWORK=sepolia # or mainnet # Optional: Gas price multiplier (default: 1.5 = 50% buffer) # GAS_PRICE_MULTIPLIER=1.5 # 50% buffer for faster confirmation
- Add your private key to
-
Fund Wallet
- Sepolia: Get test ETH from sepoliafaucet.com
- Mainnet: Send real ETH to your wallet address
-
Start Mining
# Mine on current network npm run mine # Mine on specific networks npm run mine:sepolia npm run mine:mainnet
npm run mine # Mine on current network
npm run mine:sepolia # Switch to Sepolia + mine
npm run mine:mainnet # Switch to mainnet + minenpm run network # Interactive network switcher
npm run network:show # Show current network
npm run network:sepolia # Switch to Sepolia testnet
npm run network:mainnet # Switch to mainnetnpm run swap # FCT swapping (mainnet only)
npm run l2hash # L1 to L2 hash conversion utilityThe miner automatically adapts to the selected network:
- Purpose: Testing and development
- ETH Source: sepoliafaucet.com
- Features: Lower gas costs, no trading pairs
- Explorer: sepolia.explorer.facet.org
- Purpose: Production mining
- ETH Source: Real ETH required
- Features: Full functionality, trading, price data
- Explorer: explorer.facet.org
# Required
PRIVATE_KEY=0x... # Your wallet private key
# Network Configuration
NETWORK=sepolia # Options: mainnet, sepolia
# Optional: Gas price multiplier for faster confirmation
GAS_PRICE_MULTIPLIER=1.5 # Default: 1.5 (50% buffer)
# Optional RPC Overrides
L1_RPC_URL=... # Custom L1 RPC endpoint
FACET_RPC_URL=... # Custom Facet RPC endpoint- Data Generation: Creates optimized mining data payload
- Gas Estimation: Calculates L1 gas costs and FCT rewards
- Price Analysis: Fetches current ETH price from eth-price.facet.org
- Transaction Execution: Sends L1 transaction to Facet inbox
- Confirmation: Waits for both L1 and Facet confirmations
The miner features a real-time dashboard that displays:
- System Information: Network, wallet address (full for easy copying), balance, ETH price
- Mining Progress: Live transaction counter, total ETH spent, FCT minted
- Current Transaction: Status updates (preparing → submitting → confirming → completed)
- Statistics: Mining rate, average cost per FCT, estimated time remaining
- Interactive Elements: Clickable transaction hashes that open in block explorer
- ✅ Interactive Dashboard: Real-time mining statistics and progress tracking
- ✅ Clean Terminal Interface: Live updates with color-coded status
- ✅ Clickable Transaction Hashes: Command+click to open in block explorer
- ✅ Multi-Network Support: Seamless mainnet/testnet switching
- ✅ Real-Time Pricing: Live ETH price from Facet API
- ✅ Gas Optimization: Efficient 95%+ mining efficiency
- ✅ Market Analysis: Cost comparisons and FDV calculations
- ✅ Trading Integration: Swap vs mine comparisons (mainnet)
- ✅ Robust Error Handling: Fallbacks and timeout management
- ✅ Flexible Mining Sizes: Choose from preset options or custom sizes
- ✅ Spending Controls: Set spending caps or use entire wallet balance
The miner calculates:
- FCT Rewards: Based on L1 calldata gas consumption
- Mining Costs: ETH burned for transaction fees
- Efficiency: Percentage of gas generating FCT vs overhead
- Market Metrics: Cost per FCT, Fully Diluted Valuation
- Node.js 18+
- pnpm (recommended) or npm
- ETH for gas fees (testnet or mainnet)