@clonegod/ttd-sui-common 1.0.67 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,9 +51,6 @@ class SuiTransactionParser {
|
|
|
51
51
|
const balanceChanges = ((_b = tx_receipt.transaction) === null || _b === void 0 ? void 0 : _b.balance_changes) || [];
|
|
52
52
|
(0, dist_1.log_info)('balance_changes', { txid, balance_changes: balanceChanges });
|
|
53
53
|
for (const change of balanceChanges) {
|
|
54
|
-
if (change.address.toLowerCase() !== this.walletAddress.toLowerCase()) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
54
|
const amount = new decimal_js_1.default(change.amount);
|
|
58
55
|
const coinType = change.coin_type;
|
|
59
56
|
const normalizedCoinType = (0, index_1.normalizeSuiTokenAddress)(coinType);
|
|
@@ -23,14 +23,14 @@ function test_get_tx_result() {
|
|
|
23
23
|
const grpc_token = process.env.SUI_GRPC_TOKEN || '';
|
|
24
24
|
const grpcConnection = index_1.GrpcConnection.getInstance(grpc_endpoint, grpc_token);
|
|
25
25
|
const ledgerService = new index_1.LedgerService(grpcConnection);
|
|
26
|
-
let wallet_address = '
|
|
26
|
+
let wallet_address = '0x6a49734e0ac36466078aa5025f8a0aa0da80c3c41cd4e79b3b67c652d47d0519';
|
|
27
27
|
let test_tx_success_buy = {
|
|
28
28
|
txid: '',
|
|
29
29
|
filename: './src/trade/test/receipt_buy_sui.json'
|
|
30
30
|
};
|
|
31
31
|
let test_tx_success_sell = {
|
|
32
|
-
txid: '
|
|
33
|
-
filename: './src/trade/test/
|
|
32
|
+
txid: '6uzFnzNmLQgyYwtxUqBzy9XEjgzwMNHxNtUJtj4zM4LK',
|
|
33
|
+
filename: './src/trade/test/receipt_buy_wal.json'
|
|
34
34
|
};
|
|
35
35
|
let { txid, filename } = test_tx_success_sell;
|
|
36
36
|
console.log('=== 测试 SUI 链交易结果查询 ===');
|
|
@@ -55,47 +55,47 @@ function get_pool_info() {
|
|
|
55
55
|
"program_id": "",
|
|
56
56
|
"authority": "",
|
|
57
57
|
"subscribe_type": "grpc",
|
|
58
|
-
"pair": "SUI
|
|
59
|
-
"dex_id": "
|
|
60
|
-
"pool_name": "SUI
|
|
61
|
-
"pool_address": "
|
|
58
|
+
"pair": "WAL/SUI",
|
|
59
|
+
"dex_id": "BLUEFIN-CLMM",
|
|
60
|
+
"pool_name": "WAL/SUI",
|
|
61
|
+
"pool_address": "0xe60bc7ade245b9f35b49686dfab0a18e5ca9176d49bef1b90f60d67d06315ff0",
|
|
62
62
|
"pool_address_hex": "",
|
|
63
63
|
"tokenA": {
|
|
64
|
-
"symbol": "
|
|
65
|
-
"address": "
|
|
64
|
+
"symbol": "WAL",
|
|
65
|
+
"address": "0x356a26eb9e012a68958082340d4c4116e7f55615cf27affcff209cf0ae544f59::wal::WAL",
|
|
66
66
|
"address_hex": "",
|
|
67
67
|
"decimals": 9,
|
|
68
|
-
"name": "
|
|
68
|
+
"name": "WAL Token",
|
|
69
69
|
"is_token2022": false,
|
|
70
|
-
"market_price": "
|
|
71
|
-
"update_time": "2025-09-
|
|
70
|
+
"market_price": "0.3692294956",
|
|
71
|
+
"update_time": "2025-09-25 13:27:28 141",
|
|
72
72
|
"alias": "",
|
|
73
73
|
"enable": true
|
|
74
74
|
},
|
|
75
75
|
"tokenB": {
|
|
76
|
-
"symbol": "
|
|
77
|
-
"address": "
|
|
76
|
+
"symbol": "SUI",
|
|
77
|
+
"address": "0x2::sui::SUI",
|
|
78
78
|
"address_hex": "",
|
|
79
|
-
"decimals":
|
|
80
|
-
"name": "
|
|
79
|
+
"decimals": 9,
|
|
80
|
+
"name": "Sui",
|
|
81
81
|
"is_token2022": false,
|
|
82
|
-
"market_price": "
|
|
83
|
-
"update_time": "2025-09-
|
|
82
|
+
"market_price": "3.2",
|
|
83
|
+
"update_time": "2025-09-25 13:27:28 141",
|
|
84
84
|
"alias": "",
|
|
85
85
|
"enable": true
|
|
86
86
|
},
|
|
87
87
|
"vaultA": "",
|
|
88
88
|
"vaultB": "",
|
|
89
89
|
"router_id": null,
|
|
90
|
-
"fee_rate":
|
|
91
|
-
"quote_token": "
|
|
92
|
-
"quote_amount_usd":
|
|
90
|
+
"fee_rate": 20,
|
|
91
|
+
"quote_token": "SUI",
|
|
92
|
+
"quote_amount_usd": 100,
|
|
93
93
|
"quote_price_decimals": 18,
|
|
94
94
|
"is_reverse_token": false,
|
|
95
95
|
"cu_limit": 200000,
|
|
96
|
-
"tvl":
|
|
97
|
-
"vol_24h":
|
|
98
|
-
"update_time": "2025-09-
|
|
96
|
+
"tvl": 1756004.9125,
|
|
97
|
+
"vol_24h": 5089953.61133362,
|
|
98
|
+
"update_time": "2025-09-25 13:27:29 241",
|
|
99
99
|
"enable": true,
|
|
100
100
|
};
|
|
101
101
|
}
|