213 lines
9.9 KiB
HTML
213 lines
9.9 KiB
HTML
{{define "specific"}}{{$cs := .CoinShortcut}}{{$addr := .Address}}{{$data := .}}
|
|
<h1>{{if $addr.ContractInfo}}Contract {{$addr.ContractInfo.Name}}{{if $addr.ContractInfo.Symbol}} ({{$addr.ContractInfo.Symbol}}){{end}}{{else}}Address{{end}} <small class="text-muted">{{formatAmount $addr.BalanceSat}} {{$cs}}</small>
|
|
</h1>
|
|
<div class="alert alert-data ellipsis">
|
|
<span class="data">{{$addr.AddrStr}}</span>
|
|
</div>
|
|
<h3>Confirmed</h3>
|
|
<div class="data-div row">
|
|
<div class="col-lg-10">
|
|
<table class="table data-table">
|
|
<tbody>
|
|
{{- if eq .ChainType 1 -}}
|
|
{{if $addr.ContractInfo}}
|
|
{{if $addr.ContractInfo.Type}}
|
|
<tr>
|
|
<td style="width: 25%;">Contract type</td>
|
|
<td class="data">{{$addr.ContractInfo.Type}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{if $addr.ContractInfo.CreatedInBlock}}
|
|
<tr>
|
|
<td style="width: 25%;">Created in Block</td>
|
|
<td class="data"><a href="/block/{{$addr.ContractInfo.CreatedInBlock}}">{{$addr.ContractInfo.CreatedInBlock}}</a></td>
|
|
</tr>
|
|
{{end}}
|
|
{{if $addr.ContractInfo.DestructedInBlock}}
|
|
<tr>
|
|
<td style="width: 25%;">Destructed in Block</td>
|
|
<td class="data"><a href="/block/{{$addr.ContractInfo.DestructedInBlock}}">{{$addr.ContractInfo.DestructedInBlock}}</a></td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
<tr>
|
|
<td style="width: 25%;">Balance</td>
|
|
<td class="data">{{formatAmount $addr.BalanceSat}} {{$cs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Transactions</td>
|
|
<td class="data">{{$addr.Txs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Non-contract Transactions</td>
|
|
<td class="data">{{$addr.NonTokenTxs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Internal Transactions</td>
|
|
<td class="data">{{$addr.InternalTxs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Nonce</td>
|
|
<td class="data">{{$addr.Nonce}}</td>
|
|
</tr>
|
|
{{if tokenCount $addr.Tokens "ERC20"}}
|
|
<tr>
|
|
<td>ERC20 Tokens</td>
|
|
<td style="padding: 0;">
|
|
<table class="table data-table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Contract</th>
|
|
<th>Tokens</th>
|
|
<th style="width: 15%;">Transfers</th>
|
|
</tr>
|
|
{{range $t := $addr.Tokens}}
|
|
{{if eq $t.Type "ERC20"}}
|
|
<tr>
|
|
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
|
<td class="data">{{formatAmountWithDecimals $t.BalanceSat $t.Decimals}} {{$t.Symbol}}</td>
|
|
<td class="data">{{$t.Transfers}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
{{- end -}}
|
|
{{if tokenCount $addr.Tokens "ERC721"}}
|
|
<tr>
|
|
<td>ERC721 Tokens</td>
|
|
<td style="padding: 0;">
|
|
<table class="table data-table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Contract</th>
|
|
<th>Tokens</th>
|
|
<th style="width: 15%;">Transfers</th>
|
|
</tr>
|
|
{{range $t := $addr.Tokens}}
|
|
{{if eq $t.Type "ERC721"}}
|
|
<tr>
|
|
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
|
<td class="data">
|
|
{{range $i, $iv := $t.Ids}}{{if $i}}, {{end}}<a href="/nft/{{$t.Contract}}/{{formatAmountWithDecimals $iv 0}}">{{formatAmountWithDecimals $iv 0}}</a>{{end}}
|
|
</td>
|
|
<td class="data">{{$t.Transfers}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
{{- end -}}
|
|
{{if tokenCount $addr.Tokens "ERC1155"}}
|
|
<tr>
|
|
<td>ERC1155 Tokens</td>
|
|
<td style="padding: 0;">
|
|
<table class="table data-table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Contract</th>
|
|
<th>Tokens</th>
|
|
<th style="width: 15%;">Transfers</th>
|
|
</tr>
|
|
{{range $t := $addr.Tokens}}
|
|
{{if eq $t.Type "ERC1155"}}
|
|
<tr>
|
|
<td class="data ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
|
<td class="data">
|
|
{{range $i, $iv := $t.MultiTokenValues}}{{if $i}}, {{end}}{{$iv.Value}} of ID <a href="/nft/{{$t.Contract}}/{{$iv.Id}}">{{$iv.Id}}</a>{{end}}
|
|
</td>
|
|
<td class="data">{{$t.Transfers}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
{{- end -}}
|
|
</tr>
|
|
{{- else -}}
|
|
<tr>
|
|
<td style="width: 25%;">Total Received</td>
|
|
<td class="data">{{formatAmount $addr.TotalReceivedSat}} {{$cs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Total Sent</td>
|
|
<td class="data">{{formatAmount $addr.TotalSentSat}} {{$cs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Final Balance</td>
|
|
<td class="data">{{formatAmount $addr.BalanceSat}} {{$cs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>No. Transactions</td>
|
|
<td class="data">{{$addr.Txs}}</td>
|
|
</tr>
|
|
{{- end -}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="col-lg-2">
|
|
<div id="qrcode" style="width: 160px; height: 160px; float: right; padding-left: 10px;"></div>
|
|
<script type="text/javascript" src="/static/js/qrcode.min.js"></script>
|
|
<script type="text/javascript">
|
|
new QRCode(document.getElementById("qrcode"), { text: "{{$addr.AddrStr}}", width: 160, height: 160 });
|
|
</script>
|
|
</div>
|
|
</div>
|
|
{{- if $addr.UnconfirmedTxs -}}
|
|
<h3>Unconfirmed</h3>
|
|
<div class="data-div">
|
|
<table class="table data-table">
|
|
<tbody>
|
|
<tr>
|
|
<td style="width: 25%;">Unconfirmed Balance</td>
|
|
<td class="data">{{formatAmount $addr.UnconfirmedBalanceSat}} {{$cs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>No. Transactions</td>
|
|
<td class="data">{{$addr.UnconfirmedTxs}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{- end}}{{if or $addr.Transactions $addr.Filter -}}
|
|
<div class="row h-container">
|
|
<h3 class="col-md-3">Transactions</h3>
|
|
<select class="col-md-3" style="background-color: #eaeaea;" onchange="self.location='?filter='+options[selectedIndex].value">
|
|
<option>All</option>
|
|
<option {{if eq $addr.Filter "inputs" -}}selected{{end}} value="inputs">Address on input side</option>
|
|
<option {{if eq $addr.Filter "outputs" -}}selected{{end}} value="outputs">Address on output side</option>
|
|
{{- if $addr.Tokens -}}
|
|
<option {{if eq $addr.Filter "0" -}}selected{{end}} value="0">Non-contract</option>
|
|
<option {{if eq $addr.Filter "1" -}}selected{{end}} value="1">Internal</option>
|
|
{{- range $t := $addr.Tokens -}}
|
|
{{if eq $t.Type "ERC20"}}
|
|
<option {{if eq $addr.Filter $t.ContractIndex -}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC20)</option>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- range $t := $addr.Tokens -}}
|
|
{{if eq $t.Type "ERC721"}}
|
|
<option {{if eq $addr.Filter $t.ContractIndex -}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC721)</option>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- range $t := $addr.Tokens -}}
|
|
{{if eq $t.Type "ERC1155"}}
|
|
<option {{if eq $addr.Filter $t.ContractIndex -}}selected{{end}} value="{{$t.ContractIndex}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}} (ERC1155)</option>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</select>
|
|
<div class="col-md-6">
|
|
{{template "paging" $data}}
|
|
</div>
|
|
</div>
|
|
<div class="data-div">
|
|
{{- range $tx := $addr.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end -}}
|
|
</div>
|
|
{{template "paging" $data }}
|
|
{{end}}{{end}} |