-
Notifications
You must be signed in to change notification settings - Fork 14
/
block.html
169 lines (168 loc) · 5.6 KB
/
block.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
<!doctype html>
<html lang="en" ng-app="clixplorer">
<head>
<title>Clixplorer</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
</head>
<body>
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark bg-primary" ng-controller="nav">
<a class="navbar-brand" href="index.html">Clixplorer</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="true" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="navbar-link" href="{{url}}">{{urlLabel}}</a>
</li>
</ul>
<div class="col-sm-3 col-md-3 my-2 my-lg-0">
<form class="navbar-form ng-pristine ng-scope ng-invalid ng-invalid-required" ng-submit="processRequest()" name="search_form" role="search">
<div class="input-group">
<input type="text" placeholder="Tx Hash, Address, or Block #" name="requestType" ng-model="search" class="form-control searchi ng-pristine ng-invalid ng-invalid-required ng-touched">
<div class="input-group-btn">
<button class="btn btn-primary btn-blue" type="submit"><i class="fa fa-search" aria-hidden="true"></i></button>
</div>
</div>
</form>
</div>
</div>
</nav>
<div id="header" class="container pt-5 pb-5 md-5" ng-controller="header">
<div class="card-group">
<div class="card text-center card-outline-info mt-2">
<div class="card-header card-outline-info">
<span class="fa fa-cube"></span> Best block
</div>
<div class="card-body card-block">
<h4 class="card-title">
<span># <a href="block.html?hash={{info.BestBlockNumber}}">{{info.BestBlockNumber}}</a></span>
</h4>
</div>
</div>
<div class="card text-center card-outline-info mt-2">
<div class="card-header card-outline-info">
<span class="fa fa-user-circle-o"></span> Last sealer
</div>
<div class="card-body card-block">
<h4 class="card-title">
<span><a href="account.html?hash={{info.LastSigner}}">{{info.LastSigner|toAddress}}</a></span>
</h4>
</div>
</div>
</div>
<!-- card-group -->
<div class="row" ng-controller="block">
<div class="col-sm-12 mt-4">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-12">
<h1 class="display-5 text-center mt-3"><span class=
"fa fa-cubes"> </span>Block {{block.number}}</h1>
</div>
</div>
<div class="row mb-3">
<div class="col-md-12">
<a class="btn btn-primary" href=
"block.html?hash={{ block.number > 0 ? block.number-1 : 'latest' }}">Previous</a>
<a class="btn btn-primary float-right" href=
"block.html?hash={{block.number+1}}">Next</a>
</div>
</div>
<div class="table-responsive">
<table class="table" id="block">
<tbody>
<tr>
<th>Hash:</th>
<td>
{{block.hash}}</td>
</tr>
<tr>
<th>Sealer:</th>
<td>
<a href=
"account.html?hash={{block.sealer}}">{{block.sealer}}</a>
</td>
</tr>
<tr>
<th>Tx:</th>
<td>{{block.transactions.length}} Transactions</td>
</tr>
<tr>
<th>Gas Limit:</th>
<td>{{block.gasLimit}}</td>
</tr>
<tr>
<th>Gas Usage:</th>
<td>{{block.gasUsed}} (%{{block.gasUsed / block.gasLimit * 100}})</td>
</tr>
<tr>
<th>Time:</th>
<td>{{ block.timestamp*1000 | date:'yyyy-MM-dd HH:mm:ss Z' }}</td>
</tr>
<tr>
<th>Size:</th>
<td>{{block.size}} bytes</td>
</tr>
<tr>
<th>Extra</th>
<td>{{block.extraData}}</td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane fade active show" id="transactions">
<div class="table-responsive">
<table class="table" id="transactions-table">
<thead>
<tr>
<th>Hash</th>
<th>Type</th>
<th>From</th>
<th>To</th>
<th>Value</th>
<th>Gas</th>
<th>Gas Price</th>
</tr>
</thead>
<tbody class="font-weight-bold">
<tr ng-repeat="tx in block.transactions">
<td>
<a href=
"tx.html?hash={{tx.hash}}">
{{tx.hash|toHash}}</a>
</td>
<td class="text-capitalize">tx</td>
<td>
<a href=
"account.html?hash={{tx.from}}">
{{tx.from|toAddress}}</a>
</td>
<td>
<a href=
"account.html?hash={{tx.to}}">
{{tx.to|toAddress}}</a>
</td>
<td>{{tx.value|fromWei}}</td>
<td>{{tx.gas}}</td>
<td>{{tx.gasPrice|fromWei}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bundle everything together -->
<script src="js/bundle.js"></script>
</body>
</html>