-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
140 lines (134 loc) · 6.43 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
<!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">
<title>Lookup your account</title>
<!-- import the webpage's stylesheet -->
<link rel="stylesheet" href="/wallet.css">
<link rel="stylesheet" href="/style.css">
<!-- import the webpage's javascript file -->
<script src="/script.js" defer></script>
</head>
<body>
<h1>Account lockup lookup</h1>
<p><i>This is temporary tool to lookup account information while explorers and wallets are catching up</i></p>
<p>
Account ID OR Trust Wallet address OR Public key:
</p>
<form onsubmit="event.preventDefault(); lookup();">
<p><input type="input" id="account" size="100" autocapitalize="off"></p>
<script id="template" type="x-tmpl-mustache">
<div class="root"><div class="sc-TFwJa eWVEKc App"><div class="ui container sc-jAaTju gkFlhh">
<div class="ui grid sc-iuJeZd eYdFHY">
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Account ID</div>
<div class="six wide computer four wide mobile six wide tablet column">{{accountId}}</div>
</div>
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Lockup account ID</div>
<div class="six wide computer four wide mobile six wide tablet column">{{lockupAccountId}}</div>
</div>
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Total Balance<div
class="sc-esjQYD gTrsiA trigger"></div>
</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ totalAmount }} Ⓝ</div>
</div>
</div>
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Owner's Balance<div
class="sc-esjQYD gTrsiA trigger"></div>
</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ ownerAccountBalance }} Ⓝ</div>
</div>
</div>
{{#lockupState}}
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Locked up amount<div
class="sc-esjQYD gTrsiA trigger"></div>
</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ lockedAmount }} Ⓝ</div>
</div>
</div>
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Liquid amount (unlocked + rewards)<div
class="sc-esjQYD gTrsiA trigger"></div>
</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ liquidAmount }} Ⓝ</div>
</div>
</div>
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Lockup period</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ lockupState.releaseDuration }} days</div>
</div>
</div>
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Release start date</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ lockupReleaseStartDate }}</div>
{{#lockupState.hasBrokenTimestamp}}
<div role="list" class="ui list sc-ifAKCX hmHZHq">
(The lockup contract implementation
<a href="https://github.com/near/core-contracts/pull/136" target="_blank">used to have an incorrect handling of the start date</a>,
so it falled back to Phase 2 date. Most probably you have more tokens unlocked than you would expect; use them wisely!)
</div>
{{/lockupState.hasBrokenTimestamp}}
</div>
</div>
{{#lockupState.lockupDuration}}
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Lockup cliff</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ lockupState.lockupDuration }} days</div>
</div>
</div>
{{/lockupState.lockupDuration}}
{{#lockupState.vestingInformation}}
<div class="row border-top">
<div class="four wide computer seven wide mobile four wide tablet column title">Vesting</div>
<div class="six wide computer four wide mobile six wide tablet column">
<div role="list" class="ui list sc-ifAKCX hmHZHq">{{ lockupState.vestingInformation }}</div>
</div>
</div>
{{/lockupState.vestingInformation}}
{{/lockupState}}
</div>
</div>
</div></div>
</script>
<p id="account-id"></p>
<div id="output"></div>
<div>
<input type="submit" value="Lookup">
</div>
<script id="pool-template" type="x-tmpl-mustache">
<h2>Staking report</h2>
{{#scannedNotDone}}
<p>Scanning pools {{scanned}} / {{totalPools}}...</p>
{{/scannedNotDone}}
<table>
<tr>
<td>Pool Name</td>
<td>Staked from Owner Account</td>
<td>Staked from Lockup</td>
</tr>
{{#result}}
<tr>
<td>{{ accountId }}</td>
<td>{{ directBalance }}</td>
<td>{{ lockupBalance }}</td>
</tr>
{{/result}}
</table>
</script>
<div id="pools"></div>
</form>
</body>
</html>