Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blockscout/lib/explorer_web/templates/chain/show.html.eex

61 lines
3.1 KiB

<section class="container__section container__section--partitioned">
<div class="blocks container__subsection">
<div class="blocks__container blocks__container--title">
<h2 class="blocks__title"><%= gettext "Blocks" %></h2>
</div>
<div class="blocks__container">
<table class="blocks__table">
<thead class="blocks__header">
<tr>
<th class="blocks__column-header"><%= gettext "Height" %></th>
<th class="blocks__column-header"><%= gettext "Age" %></th>
<th class="blocks__column-header"><%= gettext "Transactions" %></th>
<th class="blocks__column-header"><%= gettext "Gas Used" %></th>
</tr>
</thead>
<tbody>
<%= for block <- @blocks do %>
<tr class="blocks__row">
<td class="blocks__column blocks__column--height"><%= link(block.number, to: block_path(@conn, :show, @conn.assigns.locale, block.number), class: "blocks__link") %></td>
<td class="blocks__column blocks__column--age"><%= block.timestamp |> Timex.from_now %></td>
<td class="blocks__column blocks__column--transactions-count"><%= block.transactions |> Enum.count %></td>
7 years ago
<td class="blocks__column blocks__column--gas-used"><%= block.gas_used |> Cldr.Number.to_string! %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<div class="transactions container__subsection">
<div class="transactions__container transactions__container--title">
<h2 class="transactions__title"><%= gettext "Transactions" %></h2>
</div>
<div class="transactions__container">
<table class="transactions__table">
<thead class="transactions__header">
<tr>
<th class="transactions__column-header"><%= gettext "Hash" %></th>
<th class="transactions__column-header"><%= gettext "Block" %></th>
<th class="transactions__column-header"><%= gettext "Age" %></th>
<th class="transactions__column-header"><%= gettext "Value" %></th>
</tr>
</thead>
<tbody>
<%= for transaction <- @transactions do %>
<tr class="transactions__row">
<td class="transactions__column transactions__column--hash">
<div class="transactions__hash" title="<%= transaction.hash %>">
<%= link(transaction.hash, to: transaction_path(@conn, :show, @conn.assigns.locale, transaction.hash), class: "blocks__link") %>
</div>
</td>
<td class="transactions__column transactions__column--block"><%= transaction.block && transaction.block.number || "" %></td>
<td class="transactions__column transactions__column--age"><%= transaction.block && transaction.block.timestamp |> Timex.from_now || "" %></td>
<td class="transactions__column transactions__column--value"><%= Decimal.div(Decimal.new(transaction.value), Decimal.new(1_000_000_000_000_000_000)) |> Decimal.to_string(:normal) %> <%= gettext "POA" %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</section>