Mini DEX is a complete AMM (Automated Market Maker) implementation featuring:
0xFda6691C96F1b48819EE16A782aAecC720237E2b
0x16D3f4D3631E275b4D3c89Fa80DcCdd360E5d3Bc
0x5Ed6038971F5a7Cd05a5BC2b37a2eFa7547eeB8B
git clone https://github.com/your-username/mini-dex.git
cd mini-dex
cd blockchain && npm install
cd ../frontend && npm install
cd blockchain
npx hardhat node
This starts a local Ethereum network on http://127.0.0.1:8545
cd blockchain
npm run deploy:local
git clone https://github.com/blockscout/blockscout.git
cd blockscout/docker-compose
docker-compose -f hardhat-network.yml up -d
Access at: http://localhost:80
cd frontend
cp .env.local.example .env.local
npm run dev
Access at: http://localhost:3000
Add Hardhat Network:
Import Test Account: Use any private key from Hardhat output
cd blockchain
cp .env.example .env
npm run deploy:sepolia
npm run verify:sepolia
frontend/src/contracts/addresses.ts
with new contract addresses.ERC-20 token with built-in faucet functionality:
Key Features:
faucet()
function: Get 100 tokens every 24 hoursgetFaucetCooldown()
: Check remaining cooldown timeAutomated Market Maker implementation:
Key Features:
swapAtoB()
/ swapBtoA()
functionsaddLiquidity()
for pool managementgetAmountOut()
for price calculationgetPrice()
for current exchange rates