151 lines
5.0 KiB
HTML
151 lines
5.0 KiB
HTML
{{define "specific"}}{{$tx := .Tx}}{{$data := .}}
|
||
<div class="row">
|
||
<h1 class="col-12">Transaction</h1>
|
||
</div>
|
||
<div class="row pt-3">
|
||
<h5 class="col-12 d-flex h-data"><span class="ellipsis copyable">{{$tx.Txid}}</span></h5>
|
||
</div>
|
||
<table class="table data-table info-table">
|
||
<tbody>
|
||
{{if $tx.Confirmations}}
|
||
<tr>
|
||
<td>Mined Time</td>
|
||
<td>{{formatUnixTime $tx.Blocktime}}</td>
|
||
</tr>
|
||
{{end}}
|
||
<tr>
|
||
<td>In Block</td>
|
||
<td class="ellipsis" style="max-width: 280px">{{if $tx.Confirmations}}{{$tx.Blockhash}}{{else}}<span class="badge bg-danger">Unconfirmed</span>{{end}}</td>
|
||
</tr>
|
||
{{if $tx.Confirmations}}
|
||
<tr>
|
||
<td>In Block Height</td>
|
||
<td><a href="/block/{{$tx.Blockheight}}">{{formatInt $tx.Blockheight}}</a></td>
|
||
</tr>{{end}}
|
||
{{if $tx.EthereumSpecific}}
|
||
<tr>
|
||
<td>Status</td>
|
||
{{if $tx.EthereumSpecific.Status}}
|
||
{{if eq $tx.EthereumSpecific.Status 1}}
|
||
<td><span class="badge bg-success">Success</span></td>
|
||
{{else}}
|
||
{{if eq $tx.EthereumSpecific.Status 1}}
|
||
<td>Pending</td>
|
||
{{else}}
|
||
<td>Unknown</td>
|
||
{{end}}
|
||
{{end}}
|
||
{{else}}
|
||
<td><span class="badge bg-danger">Failed</span>{{if $tx.EthereumSpecific.Error}}<span class="text-danger small fw-normal ms-1"> {{$tx.EthereumSpecific.Error}}{{end}}</td>
|
||
{{end}}
|
||
</tr>
|
||
<tr>
|
||
<td>Value</td>
|
||
<td>{{amount $tx.ValueOutSat $data "copyable"}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Gas Used / Limit</td>
|
||
<td>{{if $tx.EthereumSpecific.GasUsed}}{{$tx.EthereumSpecific.GasUsed}}{{else}}pending{{end}} / {{$tx.EthereumSpecific.GasLimit}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Gas Price</td>
|
||
<td>{{amount $tx.EthereumSpecific.GasPrice $data "copyable"}}</td>
|
||
</tr>
|
||
{{else}}
|
||
<tr>
|
||
<td>Total Input</td>
|
||
<td>{{amount $tx.ValueInSat $data "copyable"}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Total Output</td>
|
||
<td>{{amount $tx.ValueOutSat $data "copyable"}}</td>
|
||
</tr>
|
||
{{if $tx.VSize}}
|
||
<tr>
|
||
<td>Size / vSize</td>
|
||
<td>{{formatInt $tx.Size}} / {{formatInt $tx.VSize}}</td>
|
||
</tr>
|
||
{{else}}
|
||
{{if $tx.Size}}
|
||
<tr>
|
||
<td>Size</td>
|
||
<td>{{formatInt $tx.Size}}</td>
|
||
</tr>
|
||
{{end}}
|
||
{{end}}
|
||
{{end}}
|
||
{{if $tx.FeesSat}}
|
||
<tr>
|
||
<td>Fees</td>
|
||
<td>{{amount $tx.FeesSat $data "copyable"}}{{if $tx.Size}} ({{feePerByte $tx}}){{end}}</td>
|
||
</tr>{{end}}
|
||
{{if not $tx.Confirmations}}
|
||
<tr>
|
||
<td><span tt="Replace by fee">RBF</span></td>
|
||
<td>
|
||
{{if $tx.Rbf}}
|
||
<span tt="Replace-by-Fee transaction, could be overridden by a new transaction">ON</span>
|
||
{{else}}
|
||
<span tt="Final transaction that can not be replaced unless it is dropped from the mempool.">OFF️</span>
|
||
{{end}}
|
||
</td>
|
||
</tr>
|
||
{{end}}
|
||
</tbody>
|
||
</table>
|
||
<h3>Details</h3>
|
||
<div>
|
||
{{template "txdetail" .}}
|
||
</div>
|
||
{{if eq .ChainType 1}}
|
||
{{if $tx.EthereumSpecific.ParsedData}}
|
||
{{if $tx.EthereumSpecific.ParsedData.Function }}
|
||
<div class="data-div">
|
||
<h5>Input Data</h5>
|
||
<div class="row">
|
||
{{if $tx.EthereumSpecific.ParsedData.Name}}<div class="col-6">{{$tx.EthereumSpecific.ParsedData.Name}}</div>{{end}}{{if $tx.EthereumSpecific.ParsedData.MethodId}}<div class="col-6">Method ID: {{$tx.EthereumSpecific.ParsedData.MethodId}}</div>{{end}}
|
||
{{if $tx.EthereumSpecific.ParsedData.Function}}<div class="col-12">Function: {{$tx.EthereumSpecific.ParsedData.Function}}</div>{{end}}
|
||
{{if $tx.EthereumSpecific.ParsedData.Params}}
|
||
<div class="col-12">
|
||
<table class="table data-table">
|
||
<thead>
|
||
<tr>
|
||
<th style="width: 5%;">#</th>
|
||
<th style="width: 25%;">Type</th>
|
||
<th>Data</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{{range $i,$p := $tx.EthereumSpecific.ParsedData.Params}}
|
||
<tr>
|
||
<td>{{$i}}</td>
|
||
<td>{{$p.Type}}</td>
|
||
<td>
|
||
{{range $j,$v := $p.Values}}
|
||
{{if $j}}<br>{{end}}
|
||
{{if hasPrefix $p.Type "address"}}<a href="/address/{{$v}}">{{$v}}</a>{{else}}{{$v}}{{end}}
|
||
{{end}}
|
||
</td>
|
||
</tr>
|
||
{{end}}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{{end}}
|
||
</div>
|
||
</div>
|
||
{{end}}
|
||
{{end}}
|
||
{{end}}
|
||
<div class="data-div">
|
||
<h5>Raw Transaction</h5>
|
||
<div class="json">
|
||
<pre id="raw"></pre>
|
||
</div>
|
||
<script type="text/javascript">
|
||
var raw = {{$tx.CoinSpecificData}};
|
||
document.getElementById('raw').innerHTML = syntaxHighlight(raw);
|
||
</script>
|
||
</div>
|
||
{{end}}
|