Files
Heyue_test/frontend
Sofio c16d846858 feat: 添加 LP 流动性池功能
新增功能:
- 添加 LPPanel 组件,支持流动性池操作
- 添加流动性 (addLiquidity): 存入 YT 代币或 WUSD 获得 ytLP
- 移除流动性 (removeLiquidity): 销毁 ytLP 获取代币
- 代币互换 (swapYT): 在池内交换 YT 代币

合约集成:
- YTRewardRouter: 0x51eEF57eC57c867AC23945f0ce21aA5A9a2C246c
- YTLPToken: 0x1b96F219E8aeE557DD8bD905a6c72cc64eA5BD7B
- YTPoolManager: 0x14246886a1E1202cb6b5a2db793eF3359d536302
- YTVault: 0x19982e5145ca5401A1084c0BF916c0E0bB343Af9
- USDY: 0x631Bd6834C50f6d2B07035c9253b4a19132E888c

UI功能:
- 显示池子 AUM、ytLP 价格、总供应量
- 显示用户 ytLP 余额和冷却时间
- Tab 切换: 添加流动性/移除流动性/代币互换
- 代币授权检查和一键授权
- 滑点容忍度设置
- 中英文翻译支持

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 07:30:53 +00:00
..
2025-12-16 07:30:53 +00:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])