-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
272 lines (266 loc) · 11.2 KB
/
Copy pathindex.html
File metadata and controls
272 lines (266 loc) · 11.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Solana 代币监控器</title>
<link rel="stylesheet" href="styles.css" />
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@solana/web3.js@latest/lib/index.iife.min.js"></script>
</head>
<body>
<div class="container">
<header class="header">
<h1>🚀 Solana 代币监控器</h1>
<p>实时监控代币价格,智能交易信号</p>
<a
href="https://github.com/HelloWorldImJoe/Solana_Voyeur"
target="_blank"
style="position: absolute; top: 20px; right: 20px"
>
<svg
height="32"
aria-hidden="true"
viewBox="0 0 16 16"
version="1.1"
width="32"
data-view-component="true"
class="octicon octicon-mark-github v-align-middle"
>
<path
fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
</a>
</header>
<main class="main-content">
<!-- 全局搜索框 -->
<div class="global-search">
<div class="search-container">
<h3 class="search-title">搜索代币</h3>
<input
type="text"
id="tokenAddress"
placeholder="输入代币地址进行查询..."
value="9raUVuzeWUk53co63M4WXLWPWE4Xc6Lpn7RS9dnkpump"
/>
<button id="searchBtn" class="btn btn-primary">查询</button>
<button id="connectWallet" class="btn btn-secondary">
连接Phantom钱包
</button>
</div>
</div>
<div class="layout-container">
<!-- 顶部:代币信息和价格趋势图 -->
<section class="top-panel">
<!-- 代币信息显示区域 -->
<div class="card">
<h2>代币信息</h2>
<div id="tokenInfo" class="token-info hidden">
<div class="token-header">
<div>
<img
id="tokenLogo"
class="token-icon"
src=""
alt="Token Logo"
onerror="this.src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiByeD0iMTYiIGZpbGw9IiNGMEYwRjAiLz4KPHBhdGggZD0iTTIxIDE0TDE3IDEwTDE1IDhMMTIgOEw5IDEwTDUgMTRMNSAxOEw5IDIyTDEyIDI0TDE0IDI2TDE3IDI0TDE5IDIyTDIzIDE4TDIzIDE0TDIxIDE0Wk0xOSAxOEwxNyAxNkwxNCAxNkwxNiAxOEwxOSAxOFoiIHN0cm9rZT0iIzM0OTg5YiIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KPC9zdmc+'"
/>
</div>
<div class="token-details">
<h2 id="tokenName">Token Name</h2>
<p id="tokenSymbol" class="token-symbol">SYMBOL</p>
</div>
</div>
<div class="price-info">
<div class="current-price-container">
<span class="price-label">当前价格: </span>
<span id="currentPrice" class="current-price">$0.00</span>
</div>
<div class="stat-item" id="marketCapContainer">
<span class="stat-label">市值: </span>
<span id="marketCap">-</span>
</div>
<div class="stat-item" id="volume24hContainer">
<span class="stat-label">24小时交易量: </span>
<span id="volume24h">-</span>
</div>
<div class="price-stats">
<div class="stat-item">
<span class="stat-label">24小时变化: </span>
<span id="priceChange24h" class="change-value">-</span>
</div>
<div class="stat-item">
<span class="stat-label">最后更新: </span>
<span id="lastUpdated">-</span>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<h2>价格趋势图</h2>
<div class="chart-controls">
<div class="time-range-selector">
<label for="timeRange">时间范围:</label>
<select id="timeRange" class="form-select">
<option value="1H" selected>1小时</option>
<option value="1D">1天</option>
<option value="1M">1个月</option>
</select>
</div>
</div>
<div class="chart-container">
<canvas id="priceChart"></canvas>
</div>
</div>
</section>
<!-- 底部:功能区域 -->
<section class="bottom-panel">
<!-- 监控设置区域 -->
<div class="card">
<h2>价格监控设置</h2>
<div class="monitor-form">
<div class="form-row">
<div class="form-group">
<label for="buyPrice">买入价格 ($)</label>
<input
type="number"
id="buyPrice"
step="0.000001"
placeholder="0.00"
/>
</div>
<div class="form-group">
<label for="sellPrice">卖出价格 ($)</label>
<input
type="number"
id="sellPrice"
step="0.000001"
placeholder="0.00"
/>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label for="buyAmount">买入数量 (SOL)</label>
<input
type="number"
id="buyAmount"
step="0.01"
placeholder="0.01"
value="0.01"
/>
</div>
<div class="form-group">
<label for="sellAmount">卖出数量 (代币)</label>
<input
type="number"
id="sellAmount"
step="1"
placeholder="100"
value="100"
/>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label>监控类型</label>
<div class="monitor-type-selector">
<label class="checkbox-label">
<input type="checkbox" id="monitorBuy" checked />
<span>买入监控</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="monitorSell" checked />
<span>卖出监控</span>
</label>
<label class="checkbox-label">
<input type="checkbox" id="autoTrade" />
<span>自动交易</span>
</label>
</div>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label for="checkInterval">检查频率 (秒)</label>
<input type="number" id="checkInterval" min="2" value="2" />
</div>
<div class="form-group">
<button id="startMonitor" class="btn btn-success">
开始监控
</button>
<button id="stopMonitor" class="btn btn-danger hidden">
停止监控
</button>
</div>
</div>
</div>
<div id="monitorStatus" class="monitor-status hidden">
<div class="status-indicator">
<span class="status-dot"></span>
<span id="statusText">监控中...</span>
</div>
<div id="lastCheck" class="last-check">
最后检查: <span id="lastCheckTime">-</span> · 价格:
<span id="lastCheckPrice">-</span>
</div>
</div>
</div>
<!-- 打赏区域 -->
<div class="card tip-compact">
<h2>打赏功能</h2>
<div class="tip-form-compact">
<div class="tip-row">
<div class="form-group">
<label for="tipToken">打赏币种</label>
<select id="tipToken" class="form-select">
<option value="SOL">SOL币 (SOL)</option>
<option value="V2EX">V2EX币 (V2EX)</option>
</select>
</div>
<div class="form-group">
<label for="tipAmount">打赏数量</label>
<input
type="number"
id="tipAmount"
step="0.01"
placeholder="0.001"
value="0.002"
/>
</div>
</div>
<div class="tip-row-full">
<div class="form-group">
<label for="recipientAddress">接收地址</label>
<input
type="text"
id="recipientAddress"
placeholder="输入接收者钱包地址..."
value="v2ex_joejoejoe.sol"
/>
</div>
</div>
<div class="tip-row-full">
<div class="form-group">
<button id="sendTip" class="btn btn-primary" disabled>
发送打赏
</button>
</div>
</div>
</div>
<div id="tipStatus" class="tip-status hidden">
<p id="tipMessage"></p>
</div>
</div>
</section>
</div>
<!-- 通知区域 -->
<div id="notifications" class="notifications"></div>
</main>
</div>
<script src="script.js"></script>
</body>
</html>