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

30
hardhat.config.js Normal file
View File

@ -0,0 +1,30 @@
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
version: "0.8.24",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
localhost: {
url: "http://127.0.0.1:8545",
chainId: 31337
},
hardhat: {
chainId: 31337
}
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
}
};