feat: 完成 Mini Swap DEX AMM 项目开发

- 添加智能合约: TokenA, TokenB, MiniSwapAMM
- 实现 AMM 流动性池功能 (x * y = k 公式)
- 支持添加/移除流动性和代币交换
- 包含完整的测试套件
- 创建 React 前端界面,支持钱包连接
- 添加 Web3 集成和现代化 UI 设计
- 包含部署脚本和完整的项目配置
This commit is contained in:
2025-07-10 01:39:43 +08:00
parent 8a2454a950
commit 3faf89e0a1
38 changed files with 28192 additions and 1 deletions

25
package.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "mini-swap-dex",
"version": "1.0.0",
"description": "一个简单的去中心化交易所 AMM 模型",
"main": "index.js",
"scripts": {
"test": "hardhat test",
"compile": "hardhat compile",
"deploy": "hardhat run scripts/deploy.js --network localhost",
"node": "hardhat node",
"dev": "cd frontend && npm start",
"build": "cd frontend && npm run build"
},
"keywords": ["defi", "dex", "amm", "ethereum", "solidity", "react"],
"author": "",
"license": "MIT",
"devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"hardhat": "^2.19.0"
},
"dependencies": {
"@openzeppelin/contracts": "^5.0.0",
"dotenv": "^16.3.1"
}
}