-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·782 lines (748 loc) · 42 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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stick Man</title>
</head>
<script src="assets/js/vue.js"></script>
<!-- element js -->
<script src="assets/js/index.js"></script>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/aos.css">
<link rel="stylesheet" href="assets/css/all.min.css">
<link rel="stylesheet" href="assets/css/lightcase.css">
<link rel="stylesheet" href="assets/css/swiper-bundle.min.css">
<link rel="stylesheet" href="assets/css/style.css">
<!-- element css -->
<link rel="stylesheet" href="assets/css/index.css">
<link rel="stylesheet" href="assets/css/newindex.css">
<style type="text/css">.cd-product{
position: fixed;
z-index: 9999;
bottom: 2%;
right: 6%;
}
</style>
<body>
<div id="app">
<div class="preloader">
<img src="images/preloader.png" alt="Apes land">
</div>
<header class="header-section">
<div class="header-bottom" style="padding:18px 0px !important;">
<div class="container">
<div class="header-wrapper">
<div class="logo">
<a href="index.html" style="float: left;">
<img style="width:160px;" src="images/1.png" alt="logo">
</a>
</div>
<div>
<ul class="menu">
<li><a href="#home">HOME</a></li>
<li><a href="https://docs.google.com/forms/d/e/1FAIpQLSdVtIXVmNpZRwaUs0aEda_ZxlOnsuxynpO-CT9VgUhKXvY2ew/viewform?usp=sf_link" target="_blank">Airdrop</a></li>
<li><a href="#about">ABOUT</a></li>
<li><a href="#mint">HOW TO MINT</a></li>
<li><a href="#roadmap">ROADMAP</a></li>
<li><a href="https://docs.stick.finance">WhitePaper</a></li>
</ul>
</div>
<div class="lianjie" @click="connectWallet()">{{account ? hiddenAddress(account) : 'Connect Wallet'}}</div>
<div class="header-bar d-lg-none">
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
</div>
</header>
<!-- languge -->
<section class="cd-product">
<div class="cd-product-mockupe">
<select id="provincesList1" name="provincesOption1" style="width:120px;height: 40px;font-size: 20px;text-align: center;border-radius: 5px;" onchange="window.location=this.value">
<option>English</option>
<option :value="'zh.html?refer='+getrefer" >简体中文</option>
<option :value="'tw.html?refer='+getrefer">繁體中文</option>
<option :value="'jp.html?refer='+getrefer">日本語</option>
<option :value="'kr.html?refer='+getrefer">한국어</option>
<option :value="'fr.html?refer='+getrefer">Français</option>
<option :value="'de.html?refer='+getrefer">Deutsch</option>
<option :value="'al.html?refer='+getrefer">بالعربية </option>
<option :value="'po.html?refer='+getrefer">Português</option>
<option :value="'it.html?refer='+getrefer">Italiano</option>
<option :value="'ru.html?refer='+getrefer">Русский язык</option>
</select>
</div>
<div style="display:none;">
{{getrefercode()}}
</div>
</section>
<!-- end languge -->
<div style="width: 100%;height: 1px;"></div>
<section class="about padding-top teltop" id="home" style="padding-bottom: 20px;">
<div class="container containeryzm" style="position: relative;">
<div style="position: relative;">
<img class="huocai" src="images/9.png">
<div class="xiaologo">
<a href="https://twitter.com/StickFinance"><img src="images/5.png"></a>
<a href="https://t.me/Stick2023"><img src="images/6.png"></a>
<a href="https://www.youtube.com/@StickFinance"><img src="images/7.png"></a>
<a href="https://medium.com/@stickfinance"><img src="images/8.png"></a>
</div>
</div>
<div class="about__wrapper about__wrapperhuocai">
<div class="row g-5" style="margin:0 auto;color: #000;">
<div class="col-lg-12 pccont" data-aos="fade-up" data-aos-duration="2000">
<div class="about__content">
<p class="cont510_title">Phase 1 : Mint Free $STIC Now!</p>
<p class="cont510_p" style="margin-top: 10px;">A total of
100,000,000,000,000(30%total
supply) $STIC tokens are nowavailable to be mint.Each person mints 10 $STIC per second, and invites a friend to increase the mining rate by 10 STIC/S, with no upper limit. For example: you invite 10 friends, your mining rate is 110STIC/S.</p>
<div class="cont1">
<!-- <div class="fl" :style="'width: '+process+'%;'">Minted</div> -->
<div class="fl"><img class="zhongjianxiaoren" src="images/13.png">
</div>
</div>
<div class="cont2"><img class="xia" src="images/11.png" :style="'width: '+process+'%;'"><img
class="shang" src="images/12.png"></div>
<div class="btn-group bottomyzm justify-content-center">
<a v-loading="loading.startMint" @click="startMint()" class="default-btn default-btn--secondary" :class="person.initial ? 'disabled':''"><span>
{{person.initial ? '$STIC Mining':'Start Mint'}}
</span></a>
<a v-loading="loading.withdrawal" @click="withdrawal()" class="default-btn default-btn--secondary" :class="person.initial ? '':'disabled'"> <span>Claim</span></a>
</div>
<div class="btn-group sangediv justify-content-center">
<div class="fl">
<p class="toufont">{{person.reward}}</p>
<p class="twofont">Unclaimed</p>
</div>
<div class="fl" style="margin-left: 5%;">
<p class="toufont">{{power}}</p>
<p class="twofont">STIC/S</p>
</div>
<div class="fr">
<p class="toufont">{{person.inviteCount}}</p>
<p class="twofont">Invited</p>
</div>
</div>
<div style="clear: both;"></div>
<p class="cont510_title" style="margin-top: 15px;">Invited Friends</p>
<div class="kaobei">
<img src="images/14.png">
<span class="wenzi520"><b>Invitation Links:</b> {{showInvitation()}}</span>
<span class="copy520" @click="onCopy">copy</span>
</div>
<div class="zhongjiang">
<div v-for="(item) in inviters" class="zjdiv">
<div>{{parseTime(item.datetime)}}</div>
<div>{{hiddenAddress(item.address)}}</div>
<div>Success</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<img src="images/42.png" class="xian" style="margin-top: 20px;">
<!-- ido -->
<section class="about" id="" style="padding-bottom: 20px;">
<div class="container containeryzm">
<div class="about__wrapper">
<div class="row g-5" style="margin-top: var(--bs-gutter-y);">
<div class="col-lg-4">
<div class="about__content" data-aos="fade-left" data-aos-duration="2000">
<div class="gongao">
<p class="biaoti"><b>$STIC IDO</b></p>
<p class="neirong">
<b>$STIC Public Sale</b><br><br>
A total of 100,000,000,000,000(33.33% total supply) <br><br>
PRICE 1 $BNB = 100,000,000,000 $STIC <br><br>
After ido ends, all 80% of BNB is added to the liquidity pool.And listed on the exchange.<br><br>
List time:20/06/2023
</p>
</div>
</div>
</div>
<div class="col-lg-8" data-aos="fade-right" data-aos-duration="1500">
<div class="about__thumb">
<div class="coming-soon__content">
<ul class="countdown" data-date="June 20, 2023 22:00:00" id="countdown">
<li class="countdown__item">
<h3 class="countdown__number color--theme-color countdown__number-days">0
</h3>
<p class="countdown__text">Days</p>
</li>
<li class="countdown__item">
<h3 class="countdown__number color--theme-color countdown__number-hours">0
</h3>
<p class="countdown__text">Hour</p>
</li>
<li class="countdown__item">
<h3 class="countdown__number color--theme-color countdown__number-minutes">0
</h3>
<p class="countdown__text">Minu</p>
</li>
<li class="countdown__item">
<h3 class="countdown__number color--theme-color countdown__number-seconds">0
</h3>
<p class="countdown__text">Seco</p>
</li>
</ul>
</div>
</div>
<div class="cont3">
<div class="marginTop10">
<el-input class="fl" style="width: 50%;font-size:20px;color:black;" v-model="input1"
></el-input>
<div class="fr">
<span class="eth fr colorA">BNB</span><img class="logoyzm fr"
src="images/logo.png">
</div>
<div class="clear"></div>
</div>
<div class="marginTop10">
<span class="buy fl colorA"></span><span class="buy fr colorA">{{ethBalance}}</span><span
class="buy colorA fr" style="padding-right: 10px;">Balance</span>
<div class="clear"></div>
</div>
</div>
<img class="jiantou" src="images/15.png">
<div class="cont3" style="margin-top:10px">
<div class="cont3copy">
<span class="money fl colorA">{{input1 * rate}}</span>
<div class="fr">
<span class="eth fr colorA">STIC</span><img class="logoyzm fr"
src="images/logo1.png">
</div>
<div class="clear"></div>
</div>
<div class="marginTop10">
<span class="buy fl colorA"></span><span class="buy fr colorA">{{tokenBalance}}</span><span
class="buy colorA fr" style="padding-right: 10px;">Balance</span>
<div class="clear"></div>
</div>
</div>
<div v-loading="loading.exchange" @click="exchange()" class="anniu">exchange</div>
</div>
</div>
</div>
</div>
</section>
<!-- xian -->
<img class="xian" src="images/16.png" style="margin-top: 20px;">
<!-- ido end -->
<section class="about padding-top" id="about" style="padding-bottom: 20px;">
<div class="container containeryzm" style="margin-top: 10px;">
<div class="about__wrapper">
<div class="row g-5">
<div class="col-lg-6">
<div class="about__thumb" data-aos="fade-right" data-aos-duration="1500">
<img src="images/17.png" alt="About Image">
</div>
</div>
<div class="col-lg-6" data-aos="fade-left" data-aos-duration="2000">
<div class="about__content fr about__contentyzm">
<div class="gongao1">
<p class="biaoti">ABOUT $STIC</p>
<p class="neirong">$STIC aims to become a community building crypto asset that
connects like
minded people together. If you are a seasoned miner or simply Crypto curious,
$STIC has the lowest barrier to entry through its unique tokenomics.</p>
<p class="neirong">The total amount of $STIC is 300 trillion, 100 trillion $STIC is
obtained through mining, and the remaining 200 trillion $STIC is used for IDO,
market liquidity,$STIC Mining, etc.The team holds 30 trillion.</p>
<p class="neirong"><b>BSC Contract Address : {{tokenContract}}</b></p>
</div>
</div>
<div style="clear: both;"></div>
<div class="anniuguizhe fr">
<ul>
<li><a href="https://twitter.com/StickFinance"><img src="images/18.png" alt=""></a></li>
<li><a href="https://t.me/Stick2023"><img src="images/19.png" alt=""></a></li>
<li><a href="https://www.youtube.com/@StickFinance"><img src="images/20.png" alt=""></a></li>
<li><a href="https://medium.com/@stickfinance"><img src="images/21.png" alt=""></a></li>
<li><a href="https://bscscan.com/token/0x0694ad25e6c67da10f7b07ad527fe8edf2ba23ae"><img src="images/23.png" alt=""></a></li>
<li><img src="images/24.png" alt=""></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="about padding-top" id="" style="padding-bottom: 20px;">
<div class="container containeryzmpblic">
<div class="about__wrapper">
<div class="row g-5">
<div class="cont510_title1">Join the Community!</div>
<div class="col-lg-6" style="margin-top: 30px;">
<div class="gongaonity" data-aos="fade-up" data-aos-duration="1500">
<div class="nityzuo">
<div style="width: 100%;height: 35px;">
<p class="fl wenzi" style="margin-bottom: 0px;">Stick Man</p>
<div class="shezhiyzm fr"><span>Twitter</span><img src="images/25.png">
</div>
</div>
<p class="aite">@StickFinance</p>
<div class="floowzuo">
<div class="floowzuoone">
<p>$STIC has no initial coin supply. Supply is generated by all people that ...</p>
<p><span style="margin-right: 10px;"></span> </p>
<p class="fudongfllow" style="color: #fff;"><a href="https://twitter.com/StickFinance">FOLLOW</a></p>
</div>
</div>
</div>
<img src="images/26.png" class="feige">
</div>
</div>
<div class="col-lg-6" style="margin-top: 30px;">
<div class="gongaonity" data-aos="fade-up" data-aos-duration="1500">
<div class="nityzuo">
<div style="width: 100%;height: 35px;">
<p class="fl wenzi" style="margin-bottom: 0px;">Stick Man</p>
<div class="shezhiyzm fr"><span>Telegram</span><img src="images/25.png">
</div>
</div>
<p class="aite">https://t.me/Stick2023</p>
<div class="floowzuo">
<div class="floowzuoone">
<p>A new virtual mining is about to start. $STIC is a virtual machine, and everyone only needs to ... </p>
<p><span style="margin-right: 10px;"></span> </p>
<p class="fudongfllow" style="color: #fff;"><a href="https://t.me/Stick2023">FOLLOW</a></p>
</div>
</div>
</div>
<img src="images/27.png" class="feige">
</div>
</div>
</div>
</div>
</div>
</section>
<!-- xian -->
<img class="xian" src="images/28.png" style="margin-top: 20px;">
<section class="about padding-top" style="padding-bottom: 20px;" id="mint">
<div class="container containeryzmpblic">
<div class="about__wrapper" data-aos="fade-up" data-aos-duration="1500">
<div class="cont510_title1">HOW TO MINT</div>
<div class="row marsgong" style="width:100%;margin:0 auto;margin-top: 30px;">
<div class="col-lg-2" style="margin-top: 0px;text-align: center;">
<img src="images/29.png" class="qwtyzm">
</div>
<div class="col-lg-10" style="margin-top: 0px;">
<div class="marsyzm col-lg-10" style="width: 100%;">
<div class="marsyzmyou">
<span class="cont510_title2">Create a Wallet</span>
<div class="marsp">
<p class="textright">Download Metamask or your wallet of choice from the app
store or google
play store for free. For desktop users, download the google chrome extension
by going to metamask.io.</p>
</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
</div>
<div class="row marsgong" style="width:100%;margin:0 auto;margin-top: 30px;">
<div class="col-lg-2" style="margin-top: 0px;text-align: center;">
<img src="images/30.png" class="qwtyzm">
</div>
<div class="col-lg-10" style="margin-top: 0px;">
<div class="marsyzm col-lg-10" style="width: 100%;">
<div class="marsyzmyou">
<span class="cont510_title2">Go to Stick.finance</span>
<div class="marsp">
<p class="textright">Connect to Stick.finance.Go to Stick. finance in google
chrome or on the browser inside your Metamask app. Connect your wallet.
</p>
</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
</div>
<div class="row marsgong" style="width:100%;margin:0 auto;margin-top: 30px;">
<div class="col-lg-2" style="margin-top: 0px;text-align: center;">
<img src="images/31.png" class="qwtyzm">
</div>
<div class="col-lg-10" style="margin-top: 0px;">
<div class="marsyzm col-lg-10" style="width: 100%;">
<div class="marsyzmyou">
<span class="cont510_title2">Click Start Mint</span>
<div class="marsp">
<p class="textright">Can mint 10 $STIC per second, invite friends to join mining,
can get more mining rewards.</p>
</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- xian -->
<img class="xian" src="images/32.png" style="margin-top: 20px;">
<section class="counter counter--uplifted" id="roadmap">
<div class="container containeryzmpblic" style="margin-bottom: 40px;margin-top: 40px;">
<div class="counter__wrapper" data-aos="fade-up" data-aos-duration="1500">
<div class="row g-1">
<div class="cont510_title1" style="margin-top: -10%;">STick Man RoadMap</div>
<div class="counter__item count_yzm520">
<p class="cont_yzm_pp">Phase 1: Mining and Free Mint</p>
<p class="cont_yzm_pp">Phase 2: IDO and PancakeSwap</p>
<p class="cont_yzm_pp">Phase 3: Exchange Listings</p>
</div>
<p class="baiotidibu">The path is never promised but it gets clearer with each step.</p>
<div class="col-lg-4 col-sm-6 guide01div">
<div class="counter__item count_yzm">
<p class="cont_yzm_p">Phase 1</p>
<p class="cont_yzm_pp mtop">·Launch</p>
<p class="cont_yzm_pp mtop">·1,000+ Holders</p>
<p class="cont_yzm_pp mtop">·Mining and Free Mint
</p>
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="counter__item count_yzm">
<p class="cont_yzm_p">Phase 2</p>
<p class="cont_yzm_pp mtop">·Start $STIC IDO</p>
<p class="cont_yzm_pp mtop">·Exchange On PancakeSwap</p>
<p class="cont_yzm_pp mtop">·10,000+ Holders</p>
<p class="cont_yzm_pp mtop">CoinGecko/Coinmarketcap Listings
</p>
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="counter__item count_yzm">
<p class="cont_yzm_p">Phase 3</p>
<p class="cont_yzm_pp mtop">·Exchange Listings</p>
<p class="cont_yzm_pp mtop">·100,000+ Holders</p>
<p class="cont_yzm_pp mtop">·T1 Exchange Listings</p>
<p class="cont_yzm_pp mtop">·MEXC/Kucoin/Huobi/Bybit/OKEX/Binance</p>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="footer" style="background:#000;position: relative">
<img src="images/41.png" alt="" style="position: absolute;right: 0;top:-46px;width: 40px;">
<div class="footer__wrapper" style="">
<div class="container conmecont">
<div class="">
<img src="images/33.png" class="logoqisi fl" style="width: 150px;" alt="logo">
<div class="header-btn fl header-btnyzm">
<ul>
<li><a href="https://twitter.com/StickFinance"><img src="images/34.png" alt=""></a></li>
<li><a href="https://t.me/Stick2023"><img src="images/35.png" alt=""></a></li>
<li><a href="https://www.youtube.com/@StickFinance"><img src="images/36.png" alt=""></a></li>
<li><a href="https://medium.com/@stickfinance"><img src="images/37.png" alt=""></a></li>
<li><a href="https://bscscan.com/token/0x0694ad25e6c67da10f7b07ad527fe8edf2ba23ae"><img src="images/39.png" alt=""></a></li>
<li><img src="images/40.png" alt=""></li>
</ul>
</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
</footer>
<el-dialog :show-close="false" :visible.sync="dialogVisible" width="45%">
<!-- <div class="okx">OKX</div> -->
<div class="okx" style="margin-top: 20px;">Wallet Connect</div>
<div class="okx close524" @click="dialogVisible=false" style="margin-top: 20px;">Close</div>
</el-dialog>
</div>
</body>
<script src="assets/js/web3.min.js"></script>
<script src="assets/js/tools.js"></script>
<script>
new Vue({
el: '#app',
data: function () {
return {
dialogVisible:false,
hiddenAddress,parseTime,
input1: '0.1',
rate: 100000000000,
loading: {
exchange: false,
startMint: false,
withdrawal: false
},
web3: null,
networkId: null,
timer: null,
account: null,
tokenContract: "0x0694ad25e6c67da10f7b07ad527fe8edf2ba23ae",
exchangeContract: "0x8e747faefbe2ead42bc94ecbd79ecaf0b6e7ff89",
mintContract: "0x974fd266ba28e686864213dc124198c1474a230d",
multicallAddress: '0xff6fd90a470aaa0c1b8a54681746b07acdfedc9b', // select contract
ethBalance: "0",
tokenBalance: "0",
hostName: '',
person:{
initial: false,
inviteCount: 0,
rate: 10,
totalClaim: 0,
reward: 0,
},
mintTotal: 100000000000000,
inviters: [],
getrefer: '',
}
},
computed:{
process(){
return parseFloat(this.person.totalClaim / this.mintTotal).toFixed(2);
},
power(){
return this.person.rate * this.person.inviteCount + this.person.rate;
}
},
created() {
this.initialData();
this.hostName = window.location.protocol + '//' + window.location.hostname;
},
methods: {
async startMint(){
if(this.loading.startMint){return;}
if(this.person.initial){return;}
if(!this.web3){
this.$message({message: 'Please connect Web3 MetaMask/Trust/TokenPocket/OKX/ Wallet',type: 'error'});
return;
}
try{
this.loading.startMint = true;
const searchParams = new URLSearchParams(window.location.search);
const paramValue = searchParams.get('refer');
const refer = paramValue ? paramValue : "0x0000000000000000000000000000000000000000";
let myContract = new this.web3.eth.Contract(contractAbi, this.mintContract);
let receipt = await myContract.methods.startMint(refer).send({
from: this.account,
gasLimit:251705,
});
if(receipt){
this.$message({message: 'successfully',type: 'success'});
this.getPing();
}
}catch(e){
this.$message({message: e.message,type: 'error'});
}finally{
this.loading.startMint = false;
}
},
async withdrawal(){
if(this.loading.withdrawal){return;}
if(!this.person.initial){return;}
if(!this.web3){
this.$message({message: 'Please connect Web3 MetaMask/Trust/TokenPocket/OKX/ Wallet',type: 'error'});
return;
}
try{
this.loading.withdrawal = true;
let myContract = new this.web3.eth.Contract(contractAbi, this.mintContract);
let receipt = await myContract.methods.withdraw().send({
from: this.account,
gasLimit:183931,
});
if(receipt){
this.$message({message: 'successfully',type: 'success'});
this.getPing();
}
}catch(e){
this.$message({message: e.message,type: 'error'});
}finally{
this.loading.withdrawal = false;
}
},
showInvitation(){
if(this.account){
return this.hostName + '/?refer=' + hiddenAddress(this.account);
}
return this.hostName;
},
getrefercode(){
const searchParams = new URLSearchParams(window.location.search);
const paramValue = searchParams.get('refer');
const refer = paramValue ? paramValue : "0x0000000000000000000000000000000000000000";
return this.getrefer = refer;
return this.getrefer;
},
async exchange(){
if(!this.web3){
this.$message({message: 'Please connect Web3 MetaMask/Trust/TokenPocket/OKX/ Wallet',type: 'error'});
return;
}
if(parseFloat(this.input1) < 0.1){
this.$message({message: 'The minimum cannot be lower than 0.1 BNB.',type: 'error'});
return;
}
if(this.loading.exchange){return;}
try{
this.loading.exchange = true;
let myContract = new this.web3.eth.Contract(contractAbi, this.exchangeContract);
const value = this.input1 * 1e18;
let receipt = await myContract.methods.presale().send({
from: this.account,
value: value,
gasLimit:120000,
});
this.getTokenBlance();
this.getEthBlance();
}catch(e){
this.$message({message: e.message,type: 'error'});
}finally{
this.loading.exchange = false;
}
},
async getPing(){
console.log('timed task');
if(this.web3){
if(this.networkId !== 56){
await this.switchNetwork();
}
this.getEthBlance();
this.getTokenBlance();
this.getPersion();
this.getRewards();
}
},
async getPersion(){
let tokenCont = new this.web3.eth.Contract(contractAbi, this.mintContract);
const amount = await tokenCont.methods._currentAmount().call();
this.person.totalClaim = parseInt(this.web3.utils.fromWei(amount, 'ether'));
const user = await tokenCont.methods._users(this.account).call();
this.person.initial = user.initial;
this.person.inviteCount = user.inviteCount;
const inviteCount = user.inviteCount < 100 ? user.inviteCount : 100;
const inviterCalls = [];
if(inviteCount > 0){
for (let i = 0; i < inviteCount; i++) {
const callData = this.web3.eth.abi.encodeFunctionCall({
name: '_invites',
type: "function",
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "uint256"
}
]
},[this.account,i]);
inviterCalls.push({target: this.mintContract, callData});
}
const multicall = new this.web3.eth.Contract(contractAbi, this.multicallAddress);
console.log(inviterCalls);
const inviterList = await multicall.methods.tryAggregate(true,inviterCalls).call();
this.inviters = [];
inviterList.forEach(obj => {
console.log(obj.returnData);
let p = this.web3.eth.abi.decodeParameters(['address','uint256'],obj.returnData);
console.log(p);
this.inviters.push({
address:p[0],
datetime:p[1]
});
});
}
},
async getTokenBlance(){
let tokenCont = new this.web3.eth.Contract(contractAbi, this.tokenContract);
let balance = await tokenCont.methods.balanceOf(this.account).call();
balance = parseFloat(this.web3.utils.fromWei(balance, 'ether')).toFixed(0);
this.tokenBalance = balance;
},
async getEthBlance(){
let weiBalance = await this.web3.eth.getBalance(this.account);
this.ethBalance = parseFloat(this.web3.utils.fromWei(weiBalance, 'ether')).toFixed(4);
},
async getRewards(){
let tokenCont = new this.web3.eth.Contract(contractAbi, this.mintContract);
const amount = await tokenCont.methods.getRewards(this.account).call();
this.person.reward = parseInt(this.web3.utils.fromWei(amount, 'ether'));
},
async initialData(){
this.connectionWallet();
if (this.timer) {
clearInterval(this.timer);
}
this.timer = setInterval(this.getPing, 30000);
},
connectWallet(){
if(!window.ethereum){
this.$message({message: 'Please connect Web3 MetaMask/Trust/TokenPocket/OKX/ Wallet',type: 'error'});
return;
}
this.connectionWallet();
},
async connectionWallet(){
window.ethereum.on('accountsChanged', function(accounts) {
location.reload()
})
window.ethereum.on('chainChanged', function(networkId) {
console.log(`networkId=${networkId}`);
location.reload()
})
const ethereum = window.ethereum;
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
const accountsCatch = localStorage.getItem('accountsCatch');
if (accountsCatch && accountsCatch !== accounts[0]) {
localStorage.clear()
}
localStorage.setItem('accountsCatch', accounts[0]);
this.account = accounts[0];
this.web3 = new Web3(ethereum);
this.networkId = await this.web3.eth.net.getId();
this.getPing();
},
async switchNetwork(){
const data = {
chainId: 56,
chainName: "BSC MainNet",
name: "BNB",
symbol: "BNB",
decimals: 18,
rpcUrls: ["https://bsc-dataseed1.defibit.io"],
blockExplorerUrls: ["https://bscscan.com/"],
};
await changeChainNetwork(data);
location.reload();
},
onCopy() {
let inputDom = document.createElement('input');
inputDom.setAttribute('readonly', 'readonly');
inputDom.value = this.account ? this.hostName + '/?refer=' + this.account : this.hostName;
document.body.appendChild(inputDom);
inputDom.select();
document.execCommand('Copy');
inputDom.style.display = 'none';
inputDom.remove();
this.$message({
message: 'copy success',
type: 'success'
});
}
}
})
</script>
<script src="assets/js/jquery-3.6.0.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/all.min.js"></script>
<script src="assets/js/swiper-bundle.min.js"></script>
<script src="assets/js/aos.js"></script>
<script src="assets/js/countdown.min.js"></script>
<script src="assets/js/lightcase.js"></script>
<script src="assets/js/purecounter_vanilla.js"></script>
<script src="assets/js/custom.js"></script>
</html>