626 lines
56 KiB
Go
Raw Normal View History

// Copyright 2017-2021 DERO Project. All rights reserved.
// Use of this source code in any form is governed by RESEARCH license.
// license can be found in the LICENSE file.
// GPG: 0F39 E425 8C65 3947 702A 8234 08B2 0360 A03A 9DE8
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package main
// this files defines all the templates
var header_template string = `
{{define "header"}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<title>{{ .title }}</title>
<!--<link rel="stylesheet" type="text/css" href="/css/style.css">-->
<style type="text/css">
body {
margin: 0;
padding: 0;
color: green;
background-color: white;
}
h1, h2, h3, h4, h5, h6 {
text-align: center;
}
.center {
margin: auto;
width: 96%;
/*border: 1px solid #73AD21;
padding: 10px;*/
}
tr, li, #pages, .info {
font-family: "Lucida Console", Monaco, monospace;
font-size : 12px;
height: 22px;
}
#pages
{
margin-top: 15px;
}
td {
text-align: center;
}
a:link {
text-decoration: none;
color: blue;
}
a:visited {
text-decoration: none;
color: blue;
}
a:hover {
text-decoration: underline;
color: blue;
}
a:active {
text-decoration: none;
color: blue;
}
form {
display: inline-block;
text-align: center;
}
.style-1 input[type="text"] {
padding: 2px;
border: solid 1px #dcdcdc;
transition: box-shadow 0.3s, border 0.3s;
}
.style-1 input[type="text"]:focus,
.style-1 input[type="text"].focus {
border: solid 1px #707070;
box-shadow: 0 0 5px 1px #969696;
}
.tabs {
position: relative;
min-height: 220px; /* This part sucks */
clear: both;
margin: 25px 0;
}
.tab {
float: left;
}
.tab label {
background: white;
padding: 10px;
border: 1px solid #ccc;
margin-left: -1px;
position: relative;
left: 1px;
}
.tab [type=radio] {
display: none;
}
.content {
position: absolute;
top: 28px;
left: 0;
background: white;
right: 0;
bottom: 0;
padding: 20px;
border: 1px solid #ccc;
}
[type=radio]:checked ~ label {
background: #505050 ;
border-bottom: 1px solid green;
z-index: 2;
}
[type=radio]:checked ~ label ~ .content {
z-index: 1;
}
input#toggle-1[type=checkbox] {
position: absolute;
/*top: -9999px;*/
left: -9999px;
}
label#show-decoded-inputs {
/*-webkit-appearance: push-button;*/
/*-moz-appearance: button;*/
display: inline-block;
/*margin: 60px 0 10px 0;*/
cursor: pointer;
background-color: white;;
color: green;
width: 100%;
text-align: center;
}
div#decoded-inputs{
display: none;
}
/* Toggled State */
input#toggle-1[type=checkbox]:checked ~ div#decoded-inputs {
display: block;
}
</style>
</head>
<body>
<div>
<div class="center">
<h1 class="center">
<img alt="logo" style="vertical-align:middle" height="64" width="64" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAKSWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAAeNqdU3dYk/cWPt/3ZQ9WQtjwsZdsgQAiI6wIyBBZohCSAGGEEBJAxYWIClYUFRGcSFXEgtUKSJ2I4qAouGdBiohai1VcOO4f3Ke1fXrv7e371/u855zn/M55zw+AERImkeaiagA5UoU8Otgfj09I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j50fHxsNGr3yZM6T4aeypxPPyn5W/3nrc6vn3/3i+0vPWPzY8Av5i8+/rnmp83Lvq6mvOscjxx+8znk98ab8rc7bfe+477rfx70fmSj8QP5Q89H6Y8en0E/3Pud8/vwv94Tz+0/JIZ8AACAASURBVHja7J15fJxXee+/55x3mX20WLLl3bGdxdk3dkJCQyhpgEJZCwUKpbRAwwUK5aa3pVzoLaVAEvaGnTQkIRASIAQSsjkJ2Z3Nlrd4kWx51a5Z3+Wc+8c7M3YcSXYWjTTyPP6cjyRrNPO+5z3P79mfR9CkhiXf910pZRrIAGkgK4RoAVqAbOVr5pCfq99XfwYYBkYO+Tpa+Xro76rfjxljRoExpVS5+TQak0RzCxqHgiA4EzhTCHEmcArQVmH8NJB6xoMV4hnfV94HPwjwwwAQ2JbCVhaWZR14A2Mw431/gHLAWGUNAY8Ba4BHlFKPNJ9WEwCa9FyY3A/mAJ3AyQjOBs4AzhSQMYAxBm3GYccKkxpjMMYQhCFBGOKHQfQ1CGr/VwWE6sM3lb8HUKoKBgpLKWzLwlI
<a href="/">{{ .title }} {{if .testnet}} TestNet {{end}}</a></h1>
<!-- <h4 style="font-size: 15px; margin: 0px">(no javascript - no cookies - no web analytics trackers - no images - open sourced)</h4> -->
</div>
<div class="center">
<form action="/search" method="get" style="width:100%; margin-top:15px" class="style-1">
<input type="text" name="value" size="120"
placeholder="block height, block hash, transaction hash">
<input type="submit" value="Search">
</form>
</div>
</div>
{{if .Network_Difficulty}}
<div class="center">
<h3 style="font-size: 12px; margin-top: 20px">
Server time: {{ .servertime }} | <a href="/txpool">Transaction pool</a>
</h3>
<h3 style="font-size: 12px; margin-top: 5px; margin-bottom: 3">
Network difficulty: {{ .Network_Difficulty }}
| Hash rate: {{ .hash_rate }} KH&#x2F;s
| Average Block Time(50) {{.averageblocktime50}} sec
| Total supply : {{ .total_supply }}
| Mempool size : {{ .txpool_size }}
| Fee per kb: {{.fee_per_kb}}
| Median block size limit: {{.median_block_size}} kB
</h3>
</div>
{{end}}
{{end}}
`
var block_template string = `{{define "block"}}
{{ template "header" . }}
<div>
<H4>Block Topo height (unique): {{.block.TopoHeight}} Block height: ({{.block.Height}})</H4>
<H4>Block hash: {{.block.Hash}}</H4>
{{range $i, $a := .block.Tips}}
<H5>Previous blocks: <a href="/block/{{$a}}">{{$a}}</a></H5>
{{end}}
<!--
<H5>Next block: <a href="/block/a8ade20d5cad5e23105cfc25687beb2498844a984b1450330c67705b6c720596">a8ade20d5cad5e23105cfc25687beb2498844a984b1450330c67705b6c720596</a></H5>
-->
<table class="center">
<tr>
<td>Timestamp [UCT] (epoch):</td><td>{{.block.Block_time}} ({{.block.Epoch}})</td>
<td>Age [h:m:s]:</td><td>{{.block.Age}}</td>
<td>Δ [h:m:s]:</td><td></td>
</tr>
<tr>
<td>Major.minor version:</td><td>{{.block.Major_Version}}.{{.block.Minor_Version}}</td>
<td>Block reward:</td><td>{{.block.Reward}}</td>
<td>Block size [kB]:</td><td>{{.block.Size}}</td>
</tr>
<tr>
<td>nonce:</td><td>{{.block.Nonce}}</td>
<td>Total fees:</td><td>{{.block.Fees}}</td>
<td>No of txs:</td><td>{{.block.Tx_Count}}</td>
</tr>
</table>
<h3>Miner reward for this block</h3>
<table class="center">
<tr>
<td>Miner Address</td>
<td>outputs</td>
<td>size [kB]</td>
<td>version</td>
</tr>
<tr>
<td>{{index .block.Mtx.OutAddress 0}}</a>
<td>{{.block.Mtx.Amount}}</td>
<td>{{.block.Mtx.Size}}</td>
<td>{{.block.Mtx.Version}}</td>
</tr>
</table>
<h3>Transactions ({{.block.Tx_Count}})</h3>
<table class="center" style="width:80%">
<tr>
<td>hash</td>
<td>type</td>
<td>fee</td>
<td>ring size</td>
<td>version</td>
<td>size [kB]</td>
</tr>
{{range .block.Txs}}
<tr>
{{if .Skipped }}<td><a href="/tx/{{.Hash}}"><font color="indianred">{{.Hash}}</font> </a></td>
{{else}}
<td><a href="/tx/{{.Hash}}">{{.Hash}}</a></td>
{{end}}
<td>{{.TransactionType}}</td>
<td>{{.Fee}}</td>
<td>{{.Ring_size}}</td>
<td>{{.Version}}</td>
<td>{{.Size}}</td>
</tr>
{{end}}
</table>
</div>
{{ template "footer" . }}
{{end}}
`
var tx_template string = `{{define "tx"}}
{{ template "header" . }}
<div>
<H4 style="margin:5px">Tx hash: {{.info.Hash}} Type {{.info.TransactionType }}</H4>
2021-02-22 17:48:14 +00:00
{{if eq .info.TransactionType "BURN" }}
<H4 style="margin:5px; color: red">Burns: {{.info.Burn_Value }} DERO</H4>
{{end}}
<H5>Block: <a href="/block/{{.info.ValidBlock}}">{{.info.ValidBlock}}</a> (VALID) </H5>
{{range $i, $e := .info.InvalidBlock}}
<H5>Block: <a href="/block/{{$e}}">{{$e}}</a></H5>
{{end}}
{{if eq .info.TransactionType "PREMINE"}}
<table class="center" style="width: 80%; margin-top:10px">
<tr>
<td>{{index .info.OutAddress 0}} Registered with funds {{.info.Amount}}</td>
</tr>
</table>
{{end}}
{{if eq .info.TransactionType "REGISTRATION"}}
<table class="center" style="width: 80%; margin-top:10px">
<tr>
<td>{{index .info.OutAddress 0}} Registered </td>
</tr>
</table>
{{end}}
2021-02-22 17:48:14 +00:00
{{if or (eq .info.TransactionType "NORMAL") (eq .info.TransactionType "BURN") (eq .info.TransactionType "SC") }}
<H5 style="margin:5px">Tx RootHash: {{.info.RootHash}} built height : {{.info.HeightBuilt}} </H5>
{{if .info.PayID32}}
<H5 style="margin:5px">PaymentID: {{.info.PayID32}}</H5>
{{end}}
{{if .info.PayID8}}
<H5 style="margin:5px">Encrypted PaymentID: {{.info.PayID8}}</H5>
{{end}}
<table class="center" style="width: 80%; margin-top:10px">
<tr>
<td>Timestamp: {{.info.Timestamp}} </td>
<td>Timestamp [UTC]: {{.info.Block_time}}</td>
<td>Age [y:d:h:m:s]: {{.info.Age}} </td>
</tr>
<tr>
<td>Block: <a href="/block/{{.info.Height}}">{{.info.Height}}</a></td>
<td>Fee: {{.info.Fee}}</td>
<td>Tx size: {{.info.Size}} kB</td>
</tr>
<tr>
<td>Tx version: {{.info.Version}}</td>
<td>No of confirmations: {{.info.Depth}}</td>
<td>Signature type: {{.info.Type}}</td>
</tr>
<tr>
<td colspan="3">Extra: {{.info.Extra}}</td>
</tr>
</table>
2021-02-22 17:48:14 +00:00
{{range $ii, $ee := .info.Assets}}
<H5>SCID: {{$ee.SCID}} {{$ee.Ring_size}} inputs/outputs (RING size) Fees {{$ee.Fees}} Burned {{$ee.Burn}}</H5>
<div class="center">
<table class="center">
<tr>
<td>address</td>
</tr>
2021-02-22 17:48:14 +00:00
{{range $i, $e := $ee.Ring}}
<tr>
<td>{{ $e }}</td>
</tr>
{{end}}
</table>
</div>
2021-02-22 17:48:14 +00:00
{{end}}
2021-02-22 17:48:14 +00:00
{{if eq .info.TransactionType "SC"}}
<table class="center" style="width: 80%; margin-top:10px">
<tr>
<td>SC Balance: {{ .info.SC_Balance_string }} DERO</td>
</tr>
<tr>
<td>SC CODE:<pre style="text-align: left;"> {{ .info.SC_Code }}</pre></td>
</tr>
<tr>
<td>SC Arguments: {{ .info.SC_Args }}</td>
</tr>
</table>
{{end}}
<!-- TODO currently we donot enable user to prove or decode something -->
<br/>
<br/>
<div class="center" style="border: 1px">
<table class="center" border="1">
<tr>
<td> <h3>Prove to someone that you have sent them DERO in this transaction</h3> </td>
</tr>
<tr>
<td>
proof can be obtained using <i>get_tx_key</i>
command in <i>dero-wallet-cli</i> or from the statement
<br>
Note: proof is sent to the server, as the calculations are done on the server side
</td>
</tr>
<tr>
<td>
<form method="post" style="width:100%;margin-top:2px" class="style-1">
<input name="txproof" size="120" placeholder="Tx Proof here" type="text"><br>
<input name="raw_tx_data" value="" type="hidden">
<!--above raw_tx_data field only used when checking raw tx data through tx pusher NOTE: comment should be be closed -->
<input value="Prove sending" style="margin-top:5px" type="submit">
</form>
</td>
</tr>
{{if .info.Proof_amount }}
<tr>
<td><h2><font color="blue">{{.info.Proof_address}} Received {{.info.Proof_amount}} DERO
2021-02-22 17:48:14 +00:00
{{if .info.Proof_Payload}}
<br/> Decoded Data {{ .info.Proof_Payload}}
<br/> Raw Data
<br/><pre>{{ .info.Proof_Payload_raw}}</pre>
{{end}}
</font> </h2>
</td>
</tr>
{{end}}
{{if .info.Proof_error }}
<tr>
<td> <font color="red">{{.info.Proof_error}}</font>
</td>
</tr>
{{end}}
</table>
</div>
{{end}}
{{if eq .info.CoinBase false}}
<!-- <h3>{{.info.In}} input(s) for total of ? dero</h3>
<div class="center">
<table class="center">
<tr>
<td>
</table>
</div>
-->
{{end}}
</div>
{{ template "footer" . }}
{{end}}`
var txpool_template string = `{{define "txpool"}}
<h2 style="margin-bottom: 0px">
Transaction pool
</h2>
<h4 style="font-size: 12px; margin-top: 0px">(no of txs: {{ .txpool_size }}, size: 0.00 kB, updated every 5 seconds)</h4>
<div class="center">
<table class="center" style="width:80%">
<tr>
<td>height built</td>
<td>transaction hash</td>
<td>fee</td>
<td>ring size</td>
<td>tx size [kB]</td>
</tr>
{{range .mempool}}
<tr>
<td>{{.HeightBuilt}}</td>
<td><a href="/tx/{{.Hash}}">{{.Hash}}</a></td>
<td>{{.Fee}}</td>
<td>{{.Ring_size}}</td>
<td>{{.Size}}</td>
</tr>
{{end}}
</table>
</div>
{{end}}`
// full page txpool_template
var txpool_page_template string = `{{define "txpool_page"}}
{{ template "header" . }}
{{ template "txpool" . }}
{{ template "footer" . }}
{{end}}`
// not found page txpool_template
var notfound_page_template string = `{{define "notfound_page"}}
{{ template "header" . }}
<h2 style="margin-bottom: 0px"><font color="red">No details found in database</font></h2>
{{ template "footer" . }}
{{end}}`
var main_template string = `
{{define "main"}}
{{ template "header" . }}
{{ template "txpool" . }}
<h2 style="margin-bottom: 0px">Transactions in the last 11 blocks</h2>
<h4 style="font-size: 14px; margin-top: 0px">(Median size of these blocks: 0.09 kB)</h4>
{{ template "paging" . }}
<div class="center">
<table class="center">
<tr>
<td>height</td>
<td>topo height</td>
<td>age [h:m:s]<!--(Δm)--></td>
<td>size [kB]<!--(Δm)--></td>
<td>tx hash</td>
<td>type</td>
<td>fees</td>
<td>ring size</td>
<td>tx size [kB]</td>
</tr>
{{range .block_array}}
<tr>
<td> {{if .SyncBlock }} <strong>{{.Height}}</strong> {{else}} <font color="purple">{{.Height}}</font> {{end}} </td>
<td><a href="/block/{{.TopoHeight}}">{{.TopoHeight}}</a></td>
<td>{{.Age}}</td>
<td>{{.Size}}</td>
<td>block <a href="/block/{{.Hash}}">{{.Hash}} </a></td>
<td>N/A</td>
<td>{{.Mtx.Amount}}</td>
<td>0</td>
<td>{{.Mtx.Size}}</td>
</tr>
{{range .Txs}}
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
{{if .Skipped }}<td><a href="/tx/{{.Hash}}"><font color="indianred">{{.Hash}}</font> </a></td>
{{else}}
<td><a href="/tx/{{.Hash}}">{{.Hash}}</a></td>
{{end}}
<td>{{.TransactionType}}</td>
<td>{{.Fee}}</td>
<td>{{.Ring_size}}</td>
<td>{{.Size}}</td>
</tr>
{{end}}
{{end}}
</table>
{{ template "paging" . }}
</div>
{{ template "footer" . }}
{{end}}`
var paging_template string = `{{ define "paging"}}
<div id="pages" class="center" style="text-align: center;">
<a href="/page/{{.previous_page}}">previous page</a> |
<a href="/page/1">first page</a> |
current page: {{.current_page}}/<a href="/page/{{.total_page}}">{{.total_page}}</a>
| <a href="/page/{{.next_page}}">next page</a> | <a href="/">last page</a>
</div>
{{end}}`
var footer_template string = ` {{define "footer"}}
<div class="center">
<h6 style="margin-top:10px">
<a href="https://github.com/deroproject/">DERO explorer source code</a>
| explorer version (api): under development (1.0)
| dero version: golang pre-alpha
| Copyright 2017-2021 Dero Project
</h6>
</div>
</body>
</html>
{{end}}
`