|
|
|
@ -1,66 +1,65 @@ |
|
|
|
|
<section class="container__section"> |
|
|
|
|
<div class="block-detail__container"> |
|
|
|
|
<h2 class="block-detail__title"> |
|
|
|
|
<%= gettext "Block #%{number} Details", number: @block.number %> |
|
|
|
|
</h2> |
|
|
|
|
<div class="block-detail__attributes"> |
|
|
|
|
<div class="block-detail__column"> |
|
|
|
|
<section class="container__section block"> |
|
|
|
|
<div class="block__header"> |
|
|
|
|
<h1 class="block__heading"><%= gettext "Block #%{number} Details", number: @block.number %></h1> |
|
|
|
|
</div> |
|
|
|
|
<div class="block__container"> |
|
|
|
|
<div class="block__tabs"> |
|
|
|
|
<h2 class="block__tab block__tab--active"><%= gettext "Overview" %></h2> |
|
|
|
|
</div> |
|
|
|
|
<div class="block__attributes"> |
|
|
|
|
<div class="block__column"> |
|
|
|
|
<dl> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Number" %></dt> |
|
|
|
|
<dd><%= @block.number %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Age" %></dt> |
|
|
|
|
<dd><%= @block.age %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Number" %></dt> |
|
|
|
|
<dd class="block__item-value"><%= @block.number %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Timestamp" %></dt> |
|
|
|
|
<dd><%= @block.formatted_timestamp %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Timestamp" %></dt> |
|
|
|
|
<dd class="block__item-value"><%= @block.age %> (<%= @block.formatted_timestamp %>)</dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Transactions" %></dt> |
|
|
|
|
<dd><%= @block.transactions_count %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Transactions" %></dt> |
|
|
|
|
<dd class="block__item-value"><%= gettext "%{count} transactions in this block", count: @block.transactions_count %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Hash" %></dt> |
|
|
|
|
<dd><%= @block.hash %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Hash" %></dt> |
|
|
|
|
<dd class="block__item-value" title="<%= @block.hash %>"><%= @block.hash %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Parent Hash" %></dt> |
|
|
|
|
<dd><%= @block.parent_hash %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Parent Hash" %></dt> |
|
|
|
|
<dd class="block__item-value" title="<%= @block.parent_hash %>"><%= link(@block.parent_hash, to: block_path(@conn, :show, @conn.assigns.locale, @block.number - 1), class: "block__link") %> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Miner" %></dt> |
|
|
|
|
<dd><%= @block.miner %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Miner" %></dt> |
|
|
|
|
<dd class="block__item-value" title="<%= @block.miner %>"><%= @block.miner %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Difficulty" %></dt> |
|
|
|
|
<dd><%= @block.difficulty %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Difficulty" %></dt> |
|
|
|
|
<dd class="block__item-value" title="<%= @block.difficulty %>"><%= @block.difficulty |> Cldr.Number.to_string! %></dd> |
|
|
|
|
</div> |
|
|
|
|
</dl> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__column"> |
|
|
|
|
<div class="block__column"> |
|
|
|
|
<dl> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Total Difficulty" %></dt> |
|
|
|
|
<dd><%= @block.total_difficulty %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Total Difficulty" %></dt> |
|
|
|
|
<dd class="block__item-value" title="<%= @block.total_difficulty %>"><%= @block.total_difficulty |> Cldr.Number.to_string! %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Size" %></dt> |
|
|
|
|
<dd><%= @block.size %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Size" %></dt> |
|
|
|
|
<dd class="block__item-value"><%= Cldr.Unit.new(:byte, @block.size) |> Cldr.Unit.to_string! %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Gas Used" %></dt> |
|
|
|
|
<dd><%= @block.gas_used %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Gas Used" %></dt> |
|
|
|
|
<dd class="block__item-value"><%= Enum.sort_by(["#{Decimal.div(Decimal.new(@block.gas_used), Decimal.new(1_000_000_000_000_000_000)) |> Decimal.to_string(:normal)} POA", "#{@block.gas_used |> Cldr.Number.to_string!} wei"], &String.length/1) |> List.first %> (<%= @block.gas_used / @block.gas_limit |> Cldr.Number.to_string!(format: "#.#%") %>)</dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Gas Limit" %></dt> |
|
|
|
|
<dd><%= @block.gas_limit %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Gas Limit" %></dt> |
|
|
|
|
<dd class="block__item-value"><%= Enum.sort_by(["#{Decimal.div(Decimal.new(@block.gas_limit), Decimal.new(1_000_000_000_000_000_000)) |> Decimal.to_string(:normal)} POA", "#{@block.gas_limit |> Cldr.Number.to_string!} wei"], &String.length/1) |> List.first %></dd> |
|
|
|
|
</div> |
|
|
|
|
<div class="block-detail__item"> |
|
|
|
|
<dt><%= gettext "Nonce" %></dt> |
|
|
|
|
<dd><%= @block.nonce %></dd> |
|
|
|
|
<div class="block__item"> |
|
|
|
|
<dt class="block__item-key"><%= gettext "Nonce" %></dt> |
|
|
|
|
<dd class="block__item-value"><%= @block.nonce %></dd> |
|
|
|
|
</div> |
|
|
|
|
</dl> |
|
|
|
|
</div> |
|
|
|
|