feat: 实现 Builder API Key 系统级配置和 Gasless 交易支持

- 新增系统配置表(SystemConfig)用于存储 Builder API Key
- 实现 Builder API Key 的前端配置页面
- 集成 Builder Relayer API 支持 Gasless 交易
- 在 API 健康检查中添加 Builder Relayer API 检测
- 移除前端 API 测试功能,简化配置页面
- 修复赎回仓位时的 Builder API Key 检查逻辑
- 更新错误处理,引导用户配置 Builder API Key
This commit is contained in:
WrBug
2025-12-06 23:10:26 +08:00
parent 3369dbb248
commit bfbbbdd1de
27 changed files with 1971 additions and 233 deletions
+45
View File
@@ -233,8 +233,10 @@
"statistics": "Statistics",
"users": "User Management",
"systemSettings": "System",
"systemOverview": "Overview",
"language": "Language",
"apiHealth": "API Health",
"builderApiKey": "Builder API Key",
"proxy": "Proxy",
"notifications": "Notifications",
"logout": "Logout",
@@ -302,6 +304,49 @@
"systemSettingsDesc": "Configure proxy, view API health status",
"footer": "Please use the above pages for configuration management."
},
"builderApiKey": {
"title": "Builder API Key Configuration",
"alertTitle": "What is Builder API Key?",
"description": "Builder API Key is a system-level configuration, not related to your account. It is an API credential for Polymarket's Builder service, used to execute Gasless (no gas fee) transactions.",
"purposeTitle": "Main purposes:",
"purpose1": "Execute Gasless transactions: Operations like redeeming positions and creating orders don't require gas fees",
"purpose2": "Improve user experience: No need to prepare MATIC tokens in wallet for gas fees",
"purpose3": "Reduce transaction costs: Gas fees are covered by Builder service",
"getApiKey": "Get API Key:",
"openSettings": "Go to Polymarket Settings",
"apiKey": "Builder API Key",
"secret": "Builder Secret",
"passphrase": "Builder Passphrase",
"apiKeyPlaceholder": "Please enter Builder API Key",
"secretPlaceholder": "Please enter Builder Secret",
"passphrasePlaceholder": "Please enter Builder Passphrase",
"apiKeyHelp": "Configured, enter new value to update",
"secretHelp": "Configured, enter new value to update",
"passphraseHelp": "Configured, enter new value to update",
"saveSuccess": "Builder API Key configuration saved successfully",
"saveFailed": "Failed to save Builder API Key configuration",
"getFailed": "Failed to get Builder API Key configuration",
"notConfigured": "Builder API Key not configured, please go to System Settings to configure",
"notConfiguredError": "Builder API Key not configured, cannot execute Gasless transactions. Please go to System Settings to configure Builder API Key.",
"apiReference": "API Reference Documentation",
"apiReferenceDesc": "Learn more about Builder API usage:",
"relayerApiDocs": "Builder Relayer API Documentation",
"builderDocs": "Builder Development Documentation",
"apiTest": "API Test",
"apiTestDesc": "Test if Builder API is working correctly",
"testNonce": "Test Get Nonce",
"testNonceHelp": "Enter Safe address (proxyAddress)",
"testDeployed": "Test Check Deployed Status",
"testDeployedHelp": "Enter Safe address (proxyAddress)",
"testTransaction": "Test Get Transaction Status",
"testTransactionHelp": "Enter transaction ID",
"testAddressRequired": "Please enter address",
"testTransactionIdRequired": "Please enter transaction ID",
"testAddressPlaceholder": "Enter address, e.g., 0x...",
"testTransactionIdPlaceholder": "Enter transaction ID",
"testSuccess": "Test successful",
"testFailed": "Test failed"
},
"resetPassword": {
"title": "Reset Password",
"firstUse": "First Time Using System",