218 lines
8.8 KiB
HTML
218 lines
8.8 KiB
HTML
{{define "specific"}}{{$addr := .Address}}{{$data := .}}
|
|
<div class="row">
|
|
<div class="col-md-10 order-2 order-md-1">
|
|
<h1>{{if $addr.ContractInfo}}Contract {{$addr.ContractInfo.Name}}{{if $addr.ContractInfo.Symbol}} ({{$addr.ContractInfo.Symbol}}){{end}}{{else}}Address{{end}}</h1>
|
|
<h5 class="col-12 d-flex h-data pb-2"><span class="ellipsis copyable">{{$addr.AddrStr}}</span></h5>
|
|
<h4>{{amountSpan $addr.BalanceSat $data "copyable"}}</h4>
|
|
</div>
|
|
<div class="col-md-2 order-1 order-md-2 d-flex justify-content-center justify-content-md-end mb-3 mb-md-0">
|
|
<div id="qrcode"></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: 120, height: 120 });
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<table class="table data-table info-table">
|
|
<tbody>
|
|
<tr>
|
|
<td style="white-space: nowrap;"><h5>Confirmed</h5></td>
|
|
<td></td>
|
|
</tr>
|
|
{{if eq .ChainType 1}}
|
|
{{if $addr.ContractInfo}}
|
|
{{if $addr.ContractInfo.Type}}
|
|
<tr>
|
|
<td style="width: 25%;">Contract type</td>
|
|
<td>{{$addr.ContractInfo.Type}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{if $addr.ContractInfo.CreatedInBlock}}
|
|
<tr>
|
|
<td style="width: 25%;">Created in Block</td>
|
|
<td><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><a href="/block/{{$addr.ContractInfo.DestructedInBlock}}">{{$addr.ContractInfo.DestructedInBlock}}</a></td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
<tr>
|
|
<td style="width: 25%;">Balance</td>
|
|
<td>{{amountSpan $addr.BalanceSat $data "copyable"}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Transactions</td>
|
|
<td>{{$addr.Txs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Non-contract Transactions</td>
|
|
<td>{{$addr.NonTokenTxs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Internal Transactions</td>
|
|
<td>{{$addr.InternalTxs}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Nonce</td>
|
|
<td>{{$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="ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
|
<td>{{formatAmountWithDecimals $t.BalanceSat $t.Decimals}} {{$t.Symbol}}</td>
|
|
<td>{{$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="ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
|
<td>
|
|
{{range $i, $iv := $t.Ids}}{{if $i}}, {{end}}<a href="/nft/{{$t.Contract}}/{{formatAmountWithDecimals $iv 0}}">{{formatAmountWithDecimals $iv 0}}</a>{{end}}
|
|
</td>
|
|
<td>{{$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="ellipsis"><a href="/address/{{$t.Contract}}">{{if $t.Name}}{{$t.Name}}{{else}}{{$t.Contract}}{{end}}</a></td>
|
|
<td>
|
|
{{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>{{$t.Transfers}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tr>
|
|
{{else}}
|
|
<tr>
|
|
<td style="width: 25%;">Total Received</td>
|
|
<td>{{amountSpan $addr.TotalReceivedSat $data "copyable"}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Total Sent</td>
|
|
<td>{{amountSpan $addr.TotalSentSat $data "copyable"}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Final Balance</td>
|
|
<td>{{amountSpan $addr.BalanceSat $data "copyable"}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>No. Transactions</td>
|
|
<td>{{formatInt $addr.Txs}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{if $addr.UnconfirmedTxs}}
|
|
<table class="table data-table info-table">
|
|
<tbody>
|
|
<tr>
|
|
<td style="white-space: nowrap;"><h5>Unconfirmed</h5></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width: 25%;">Unconfirmed Balance</td>
|
|
<td>{{amountSpan $addr.UnconfirmedBalanceSat $data "copyable"}}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>No. Transactions</td>
|
|
<td>{{formatInt $addr.UnconfirmedTxs}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
{{end}}
|
|
{{if or $addr.Transactions $addr.Filter}}
|
|
<div class="row pt-3 pb-1">
|
|
<h3 class="col-sm-6 col-lg-3 m-0 align-self-center">Transactions</h3>
|
|
<div class="col-sm-6 col-lg-3 my-2 my-lg-0 align-self-center">
|
|
<select class="w-100" 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>
|
|
<div class="col-lg-6">
|
|
{{template "paging" $data}}
|
|
</div>
|
|
</div>
|
|
<div>
|
|
{{range $tx := $addr.Transactions}}{{$data := setTxToTemplateData $data $tx}}{{template "txdetail" $data}}{{end}}
|
|
</div>
|
|
{{template "paging" $data }}
|
|
{{end}}{{end}} |