-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
335 lines (310 loc) · 14.7 KB
/
index.html
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!doctype html>
<html lang="zh">
<head>
<title>HydraSF@三豐-HongKong</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A stable, safe, decentralized, easy to use Conflux PoS Pool">
<meta name="keywords" content="Conflux, PoS, Pool, SF, decentralized"><link rel="shortcut icon" href="favicon.ico">
<link href="app/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="app/bootstrap-icons.css">
<link rel="stylesheet" href="styles/style.css">
</head>
<body class="bg-light">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" id="navbar">
<div class="container">
<a class="navbar-brand" href="#">
<img src="favicon.ico" alt="" width="30" height="30" class="d-inline-block align-text-top">
三豐礦池--香港
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item" @click="changeSpace('Core')">
<a :class="`nav-link ${space.value == 'Core' ? 'active' : ''}`" href="#">Core</a>
</li>
<li v-if="config.value.eSpaceAddress" class="nav-item" @click="changeSpace('eSpace')">
<a :class="`nav-link ${space.value == 'eSpace' ? 'active' : ''}`" href="#">eSpace</a>
</li>
</ul>
</div>
</div>
</nav>
<div id='app' class="container d-none">
<div class="row justify-content-end mt-3">
<div class="col-md-3 col-6">
<button v-if="!userInfo.connected" class="btn btn-primary" v-on:click="connectWallet">Connect Wallet</button>
<div v-else>
<button type="button" class="btn btn-outline-primary">
{{shortenAccount}}
</button>
<span class="text-primary" v-if="chainStatus.chainId === 1"> TestNet</span>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col text-center">
<h1 style="color: cornflowerblue">三豐礦池--香港站</h1>
<p>請質押您的CFX到Conflux PoS以幫助Conflux提高網路的安全穩定並且贏得PoS獎賞!</p>
<a href="./mobile" target="_blank">手機版本</a> <a href="./en" target="_blank">English Version</a>
<br/><span class="intro-title" style="color: red">QQ Group: 371489106</span>
<br/><span class="intro-title" style="color: red">WeiXin: Axy090909</span>
</div>
</div>
<div class="row mt-3 border b-shadow rounded-3 p-4">
<div class="col-6 col-md-4 col-lg-2">
<div class="left-icon float-start">
<i class="bi-bank" style="font-size: 40px; color: cornflowerblue;"></i>
</div>
<div>
<div><span class="h-num" :title="formatedTotalLocked">{{prettyTotalLocked}}</span></div>
<span class="intro-title">礦池鎖倉</span>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2">
<div class="left-icon float-start">
<i class="bi-cash-coin" style="font-size: 40px; color: cornflowerblue;"></i>
</div>
<div>
<div><span class="h-num" :title="formatedTotalRevenue">{{prettyTotalRevenue}}</span></div>
<span class="intro-title">收益總值</span>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2">
<div class="left-icon float-start">
<i class="bi-percent" style="font-size: 40px; color: cornflowerblue;"></i>
</div>
<div>
<div><span class="h-num">{{poolInfo.apy}}%</span></div>
<span class="intro-title">年化收益率</span>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2">
<div class="left-icon float-start">
<i class="bi-people" style="font-size: 40px; color: cornflowerblue;"></i>
</div>
<div>
<div><span class="h-num">{{poolInfo.stakerNumber}}</span></div>
<span class="intro-title">質押帳號總數</span>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2">
<div class="left-icon float-start">
<i class="bi-plug" style="font-size: 40px; color: cornflowerblue;"></i>
</div>
<div>
<div>
<span v-if="poolInfo.status.forceRetired === true" class="h-num" style="color:#42b883">錯誤</span>
<span v-else class="h-num" style="color:#42b883">良好</span>
</div>
<span class="intro-title">礦池狀態</span>
</div>
</div>
<div class="col-6 col-md-4 col-lg-2">
<div class="left-icon float-start">
<i class="bi-pin-map-fill" style="font-size: 40px; color: cornflowerblue;"></i>
</div>
<div>
<div><a :href="posAddressLink" target="_blank" style="line-height:30px;text-decoration:none">{{shortPosAddress}}</a></div>
<span class="intro-title">礦池合約地址</span>
</div>
</div>
<!--
<div class="col-2">
<div class="left-icon float-start">
<i class="bi-mortarboard" style="font-size: 40px; color: cornflowerblue;"></i>
</div>
<div>
<div><span class="h-num">{{poolInfo.inCommittee ? 'Yes' : 'NO'}}</span></div>
<span class="intro-title">委员会在会票數</span>
</div>
</div>
-->
</div>
<div class="row mt-3 border b-shadow rounded-3 p-2" id="rewardChartContainer" style="display:none">
<div class="col">
<canvas id="rewardChart" height="40"></canvas>
</div>
</div>
<div class="row mt-4 border b-shadow rounded-3 p-4">
<div class="col-lg-3 col-md-6 col-12 pt-4">
<div>
<div><span class="h-num">{{userStakedCFX}}</span></div>
<span class="intro-title">我的質押 (CFX)</span>
</div>
<div class="row mt-2">
<div class="col-md-7 col-12 mb-2">
<input class="form-control" type="number" v-model="stakeCount">
</div>
<div class="col-md-5 col-12">
<button class="btn btn-primary" v-on:click="stake" :disabled="!userInfo.connected">質押</button>
</div>
</div>
<p class="intro-title mt-1" v-if="userInfo.connected">餘額: {{userInfo.balance}} CFX</p>
</div>
<div class="col-lg-3 col-md-6 col-12 pt-4">
<div>
<div><span class="h-num">{{userInfo.userInterest}}</span></div>
<span class="intro-title">我的獎賞 (CFX)</span>
</div>
<button class="btn btn-primary mt-2" v-on:click="claim" :disabled="!userInfo.connected">認領</button>
<p class="intro-title mt-1" v-if="userInfo.connected && poolInfo.lastRewardTime > 0">最後刷新: {{lastRewardTime}}</p>
</div>
<div class="col-lg-3 col-md-6 col-12 pt-4">
<div>
<div><span class="h-num">{{unstakeableCFX}}</span></div>
<span class="intro-title">解除質押 CFX</span>
</div>
<div class="row mt-2">
<div class="col-md-7 col-12 mb-2">
<input class="form-control" type="number" v-model="unstakeCount">
</div>
<div class="col-md-5 col-12">
<button class="btn btn-primary" v-on:click="unstake" :disabled="!userInfo.connected">解除質押</button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-12 pt-4">
<div>
<div><span class="h-num">{{withdrawableCFX}}</span></div>
<span class="intro-title">可取款 CFX</span>
</div>
<button class="btn btn-primary mt-2" v-on:click="withdraw" :disabled="!userInfo.connected">可取款</button>
</div>
</div>
<div class="modal fade" id="hashModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" style="border-bottom: none">
<!-- <h5 class="modal-title" id="exampleModalLabel">Modal title</h5> -->
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">
<i class="bi-check-circle-fill" style="font-size: 40px; color: rgb(100, 237, 107);"></i>
<br/>
<span>提交交易</span>
<!-- <br/> -->
<!-- <span>Transaction Hash: </span> -->
<!-- <a :href="txScanLink">{{shortHash}}</a> -->
<!-- <a id="hashLink"></a> -->
<div style="height: 50px"></div>
</div>
<!-- <div class="modal-footer" style="border-top: none">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div> -->
</div>
</div>
</div>
<div class="modal fade" id="withdrawModal" tabindex="-2" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" style="border-bottom: none">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">
<i class="bi-hourglass-split" style="font-size: 40px; color: cornflowerblue;"></i>
<br/>
<span>解鎖時間根據PoW區塊時間確定,並不完全準確。您的投票可能仍被鎖定,請幾小時後再試。</span>
<div style="height: 50px"></div>
</div>
</div>
</div>
</div>
<div class="row mt-4 border b-shadow rounded-3 p-4" v-if="userInfo.connected">
<div class="col-md-6 col-12">
<table class="table table-striped table-bordered caption-top">
<caption>鎖住的投票數</caption>
<thead>
<tr>
<th scope="col">總數 (CFX)</th>
<th scope="col">最後時間</th>
</tr>
</thead>
<tbody>
<tr v-for="item in userInfo.userInQueue">
<th scope="row">{{item.amount}}</th>
<td>{{item.endTime}}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6 col-12">
<table class="table table-striped table-bordered caption-top">
<caption>未解鎖票數 votes</caption>
<thead>
<tr>
<th scope="col">總數 (CFX)</th>
<th scope="col">最後時間</th>
</tr>
</thead>
<tbody>
<tr v-for="item in userInfo.userOutOueue">
<th scope="row">{{item.amount}}</th>
<td>{{item.endTime}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row mt-4 border b-shadow rounded-3 p-3" v-if="userInfo.nftCount>0">
<div class="col">
<h5>創世 NFT:</h5>
<img src="https://cfxmint.club/NFT/SF_PoS_Pool_Genesis_NFT_Small/NFT/SF_PoS_Pool_Genesis_NFT_Small.png" alt="" width="180">
</div>
</div>
<div class="row mt-3">
<div class="alert alert-success" role="alert">
質押聲明:
<br/>
1. 安全第一。我們不會改變官方合約代碼規則;我們向樹圖基金會報備了實名的身份信息。
<br/>
2. 質押PoS的礦池費用僅佔用戶獲得的收益的8%。
<br/>
3. 最初的貳佰質押者將會獲得HydraSF礦池的創世NFT,并且,我們將分享部分紅利給HydraSF治理代币(HSF)和創世NFT擁有者。實施細節將通過社群DAO模式投票完成。
<br/>
</div>
</div>
<div class="col-12 col-lg-6"> </div>
</div>
<div class="row mt-3 mb-5" id='promise'>
</div>
<div class="row mt-3 mb-5" >
</div>
</div>
<script src="//cdn.staticfile.org/jquery/1.8.2/jquery.min.js"></script>
<script src="//cdn.staticfile.org/moment.js/2.24.0/moment-with-locales.min.js"></script>
<script src="//cdn.staticfile.org/moment-timezone/0.5.27/moment-timezone-with-data.min.js"></script>
<script>
var x = new moment('2022-2-20')
var y = new moment('2022-2-28')
var now=new moment()
var x1 = moment.duration(now.diff(x))
var y1 = moment.duration(now.diff(y))
var html='<span style="color:red">0 failure since PoS launch, our server running ' +parseInt(x1.asDays())+' days'+',PoS launched ' +parseInt(y1.asDays())+' days</span>, meanwhile, we maintained the PoW Test network for more than 1 year, here is our test address <a href="https://testnet.confluxscan.io/address/cfxtest:aamjxdgz4m84hjvf2s9rmw5uzd4dkh8aa6krdsh0ep?tab=mined-blocks">https://testnet.confluxscan.io/address/cfxtest:aamjxdgz4m84hjvf2s9rmw5uzd4dkh8aa6krdsh0ep?tab=mined-blocks </a> ';
$('#promise').html('');
</script>
<script src="//cdn.staticfile.org/jquery/1.8.2/jquery.min.js"></script>
<script src="app/vue.global.js"></script>
<script src='app/big.min.js'></script>
<script src="app/js-conflux-sdk.umd.min.js"></script>
<script src="app/ethers-5.2.umd.min.js" type="application/javascript"></script>
<script src="app/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="app/chart.js"></script>
<script src="app/PoolABI.js?id=2256"></script>
<script src="app/PoSPoolContract.js?id=2256"></script>
<script src="app/utils.js?id=2256"></script>
<script src="app/header.js?id=2256"></script>
<script src="app/main.js?id=2256"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-W9RSB2BS8T"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-W9RSB2BS8T');
</script>
</body>
</html>