feat: CLOB V1 → V2 完整迁移

- 更新 EIP-712 签名结构: domain version "1"→"2", 移除 taker/expiration/nonce/feeRateBps, 新增 timestamp/metadata/builder
- 更新合约地址为 V2 (CTF_EXCHANGE, NEG_RISK_EXCHANGE)
- CLOB URL 切换到 clob-v2.polymarket.com
- 抵押品代币 USDC.e → pUSD (0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB)
- 新增 USDC.e → pUSD wrap 功能 (CollateralOnramp 合约)
- SignedOrderObject 补充 API payload 必需的 taker/expiration 字段
- NewOrderRequest 补充 deferExec/postOnly 字段
- 前端账户管理新增 pUSD 迁移按钮
- 移除所有 feeRateBps 相关逻辑

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
WrBug
2026-04-20 22:24:50 +08:00
co-authored by Claude Opus 4.7
parent 04b7505094
commit 22a6544373
18 changed files with 1454 additions and 231 deletions
+14 -2
View File
@@ -284,9 +284,21 @@ export const apiService = {
/**
* 赎回仓位
*/
redeemPositions: (data: any) =>
redeemPositions: (data: any) =>
apiClient.post<ApiResponse<any>>('/accounts/positions/redeem', data),
/**
* 将 USDC.e wrap 为 pUSDV2 迁移)
*/
wrapToPusd: (accountId: number) =>
apiClient.post<ApiResponse<{ transactionHash: string | null }>>('/accounts/wrap-to-pusd', { accountId }),
/**
* 查询 USDC.e 余额(V2 迁移用)
*/
getUsdceBalance: (accountId: number) =>
apiClient.post<ApiResponse<{ balance: string }>>('/accounts/usdce-balance', { accountId }),
},
/**