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/block_transaction/index.html.eex

51 lines
4.0 KiB

<section class="container__section block">
<div class="blocks__headline">
<h1 class="blocks__headline-title"><%= gettext("Showing #%{number}", number: @conn.params["block_id"]) %></h1>
<div class="blocks__pagination"><%= pagination_links @conn, @transactions, ["en", @conn.params["block_id"]], view_style: :bulma, first: true, distance: 1, previous: Phoenix.HTML.raw("&lsaquo;"), next: Phoenix.HTML.raw("&rsaquo;"), path: &block_transaction_path/5 %></div>
</div>
<div class="block__container">
<div class="block__tabs">
<h2 class="block__tab"><%= link(gettext("Overview"), to: block_path(@conn, :show, @conn.assigns.locale, @conn.params["block_id"]), class: "block__link") %></h2>
<h2 class="block__tab block__tab--active"><%= link(gettext("Transactions"), to: block_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["block_id"]), class: "block__link block__link--active") %></h2>
</div>
<div class="transactions__container">
<table class="transactions__table">
<thead class="transactions__header">
<tr>
<th class="transactions__column-header transactions__column-header--status"><span class="transactions__column-title transactions__column-title--status"><%= gettext "Status" %></span></th>
<th class="transactions__column-header"><%= gettext "Hash" %></th>
<th class="transactions__column-header transactions__column-header--optional"><%= gettext "Block" %></th>
<th class="transactions__column-header"><%= gettext "Age" %></th>
<th class="transactions__column-header transactions__column-header--optional"><%= gettext "From" %></th>
<th class="transactions__column-header transactions__column-header--optional"><%= gettext "To" %></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--status"><div class="transactions__dot transactions__dot--<%= transaction.status %>"></div></td>
<td class="transactions__column transactions__column--hash">
<div class="transactions__hash"><%= link(transaction.hash, to: transaction_path(@conn, :show, @conn.assigns.locale, transaction.hash), class: "transactions__link transactions__link--truncated transactions__link--long-hash") %></div>
</td>
<td class="transactions__column transactions__column--block transactions__column--optional">
<%= link(transaction.block.number, to: block_path(@conn, :show, @conn.assigns.locale, transaction.block.number), class: "transactions__link") %>
</td>
<td class="transactions__column transactions__column--age">
<%= transaction.block.timestamp |> Timex.from_now %>
</td>
<td class="transactions__column transactions__column--from transactions__column--optional">
<div class="transactions__hash"><%= link(transaction.from_address.hash, to: address_path(@conn, :show, @conn.assigns.locale, transaction.from_address.hash), class: "transactions__link transactions__link--truncated transactions__link--hash") %></div>
</td>
<td class="transactions__column transactions__column--to transactions__column--optional">
<div class="transactions__hash"><%= link(transaction.to_address.hash, to: address_path(@conn, :show, @conn.assigns.locale, transaction.to_address.hash), class: "transactions__link transactions__link--truncated transactions__link--hash") %></div>
</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>