perf: usdt.aptos 适配优化
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ const (
|
||||
defaultXlayerRpcEndpoint = "https://xlayerrpc.okx.com/" // 默认Xlayer RPC节点
|
||||
defaultPolygonRpcEndpoint = "https://polygon-rpc.com/" // 默认Polygon RPC节点
|
||||
defaultEthereumRpcEndpoint = "https://ethereum.publicnode.com/" // 默认Ethereum RPC节点
|
||||
defaultAptosRpcEndpoint = "https://api.mainnet.aptoslabs.com/" // 默认Aptos RPC节点
|
||||
defaultAptosRpcEndpoint = "https://aptos-rest.publicnode.com/" // 默认Aptos RPC节点
|
||||
defaultOutputLog = "/var/log/bepusdt.log" // 默认日志输出文件
|
||||
defaultSqlitePath = "/var/lib/bepusdt/sqlite.db" // 默认数据库文件
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/v03413/bepusdt/app/conf"
|
||||
"strconv"
|
||||
@@ -155,6 +156,9 @@ func GetDetailUrl(tradeType, hash string) string {
|
||||
if tradeType == OrderTradeTypeUsdtSolana {
|
||||
return "https://solscan.io/tx/" + hash
|
||||
}
|
||||
if tradeType == OrderTradeTypeUsdtAptos {
|
||||
return fmt.Sprintf("https://explorer.aptoslabs.com/txn/%s?network=mainnet", hash)
|
||||
}
|
||||
|
||||
return "https://tronscan.org/#/transaction/" + hash
|
||||
}
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ func init() {
|
||||
|
||||
func newAptos() aptos {
|
||||
return aptos{
|
||||
versionChunkSize: 100,
|
||||
versionChunkSize: 100, // 目前好像最大就只能100
|
||||
versionConfirmedOffset: 1000,
|
||||
versionInitStartOffset: -100 * 500,
|
||||
lastVersion: 0,
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>USDT・Aptos 一款更好用的个人USDT收款网关 Bepusdt</title>
|
||||
<link rel="shortcut icon" href="/img/tether.svg"/>
|
||||
<link rel="stylesheet" href="/css/usdt.min.css">
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/jquery.qrcode_1.0.min.js"></script>
|
||||
<script src="/js/usdt.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="payment-container">
|
||||
<div class="crypto-icon">USDT</div>
|
||||
<h1 class="payment-title">USDT 支付</h1>
|
||||
<p class="payment-subtitle">
|
||||
<span class="status-indicator"></span>
|
||||
请使用 <strong>Aptos</strong> 区块网络进行转账
|
||||
<span class="network-badge">Aptos</span>
|
||||
</p>
|
||||
<div class="order-info">
|
||||
<div class="order-item">
|
||||
<span class="order-label">转账金额:</span>
|
||||
<span class="order-value amount-highlight" id="payAmount">{{.amount}} USDT</span>
|
||||
</div>
|
||||
<div class="order-item">
|
||||
<span class="order-label">商户订单:</span>
|
||||
<span class="order-value" id="orderNumber">{{.order_id}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="countdown-banner">
|
||||
<div class="countdown-content">
|
||||
<div class="countdown-info">
|
||||
<div class="countdown-title">⏰ 支付倒计时</div>
|
||||
<div class="countdown-subtitle">请在时间内完成转账</div>
|
||||
</div>
|
||||
<div class="countdown-timer" id="countdown">
|
||||
<div class="time-unit">
|
||||
<span class="time-number" id="minutes">15</span>
|
||||
<span class="time-label">分</span>
|
||||
</div>
|
||||
<span class="time-separator">:</span>
|
||||
<div class="time-unit">
|
||||
<span class="time-number" id="seconds">00</span>
|
||||
<span class="time-label">秒</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qr-section">
|
||||
<div class="qr-code" id="qrcode"></div>
|
||||
<div class="address-section">
|
||||
<div class="address-label">收款地址 (Aptos 网络)</div>
|
||||
<div class="address-text" id="walletAddress">{{.address}}</div>
|
||||
<button class="copy-btn" onclick="copyAddress()">复制地址</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="instructions">
|
||||
<h4>📋 转账说明</h4>
|
||||
<ol>
|
||||
<li>必须使用 <strong>Aptos 网络</strong> 进行转账</li>
|
||||
<li>转账完成后系统会自动确认到账</li>
|
||||
<li>转账金额必须与显示金额完全一致</li>
|
||||
<li>如果有其它疑问 请联系客服处理</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<div class="project-info">
|
||||
<span class="powered-by">Powered by</span>
|
||||
<a href="https://github.com/v03413/bepusdt" target="_blank" class="project-link">
|
||||
<strong>Bepusdt</strong>
|
||||
</a>
|
||||
<span class="open-source">Github</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
USDTPayment.init({
|
||||
expire: "{{.expire}}",
|
||||
address: "{{.address}}",
|
||||
trade_id: "{{.trade_id}}",
|
||||
return_url: "{{.return_url}}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user