@ -8,7 +8,7 @@
<%= gettext("%{block_type} Details", block_type: block_type(@block)) %>
<%= gettext("%{block_type} Details", block_type: block_type(@block)) %>
</h1>
</h1>
<!-- Block Height -->
<!-- Block Height -->
<h3 data-test="block_detail_number">
<h3 data-test="block_detail_number" style="width: 170px;" data-toggle="tooltip" data-placement="right" data-offset="0 0" title="" data-original-title="The block number in which transactions were recorded." >
<%= if block_type(@block) == "Block" do %>
<%= if block_type(@block) == "Block" do %>
<%= gettext("Block Height: %{height}", height: @block.number) %> <%= if @block.number == 0, do: "- " <> gettext("Genesis Block")%>
<%= gettext("Block Height: %{height}", height: @block.number) %> <%= if @block.number == 0, do: "- " <> gettext("Genesis Block")%>
<% else %>
<% else %>
@ -36,7 +36,8 @@
<!-- Block Hash -->
<!-- Block Hash -->
<dl class="row">
<dl class="row">
<dt class="col-sm-3 text-muted " ><%= gettext "Hash" %></dt>
<dt class="col-sm-3 text-muted " ><%= gettext "Hash" %></dt>
<dd class="col-sm-9"><a class="transaction__link"><%= to_string(@block.hash) %></a></dd>
<dd class="col-sm-9"><a class="transaction__link" data-toggle="tooltip" data-placement="top" title="" data-original-title="The SHA256 hash of the block."><%= to_string(@block.hash) %></a></dd>
</dl>
</dl>
<%= unless @block.number == 0 do %>
<%= unless @block.number == 0 do %>
@ -44,11 +45,13 @@
<dl class="row">
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Parent Hash" %></dt>
<dt class="col-sm-3 text-muted"><%= gettext "Parent Hash" %></dt>
<dd class="col-sm-9">
<dd class="col-sm-9">
<span data-toggle="tooltip" data-placement="top" title="" data-original-title="The SHA256 hash of the parent block." >
<%= link(
<%= link(
@block.parent_hash,
@block.parent_hash,
class: "transaction__link",
class: "transaction__link",
to: block_path(@conn, :show, @block.number - 1)
to: block_path(@conn, :show, @block.number - 1)
) %>
) %>
</span>
</dd>
</dd>
</dl>
</dl>
<% end %>
<% end %>
@ -57,7 +60,7 @@
<dl class="row">
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Difficulty" %></dt>
<dt class="col-sm-3 text-muted"><%= gettext "Difficulty" %></dt>
<dd class="col-sm-9" >
<dd class="col-sm-9" >
<span><%= @block.difficulty |> BlockScoutWeb.Cldr.Number.to_string! %></span>
<span data-toggle="tooltip" data-placement="top" title="" data-original-title="Block difficulty for miner, used to calibrate block generation time (Note: constant in POA based networks)." ><%= @block.difficulty |> BlockScoutWeb.Cldr.Number.to_string! %></span>
</dd>
</dd>
</dl>
</dl>
@ -65,13 +68,13 @@
<!-- Total Difficulty -->
<!-- Total Difficulty -->
<dl class="row">
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Total Difficulty" %></dt>
<dt class="col-sm-3 text-muted"><%= gettext "Total Difficulty" %></dt>
<dd class="col-sm-9"><span><%= @block.total_difficulty |> BlockScoutWeb.Cldr.Number.to_string! %></span></dd>
<dd class="col-sm-9"><span data-toggle="tooltip" data-placement="top" title="" data-original-title="Integer of the total difficulty of the chain until this block." ><%= @block.total_difficulty |> BlockScoutWeb.Cldr.Number.to_string! %></span></dd>
</dl>
</dl>
<!-- Nonce -->
<!-- Nonce -->
<dl class="row">
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Nonce" %></dt>
<dt class="col-sm-3 text-muted"><%= gettext "Nonce" %></dt>
<dd class="col-sm-9"><span><%= to_string(@block.nonce) %></span></dd>
<dd class="col-sm-9"><span data-toggle="tooltip" data-placement="top" title="" data-original-title="64-bit hash of value verifying proof-of-work (note: null for POA chains)." ><%= to_string(@block.nonce) %></span></dd>
</dl>
</dl>
<%= if length(@block.uncle_relations) > 0 do %>
<%= if length(@block.uncle_relations) > 0 do %>
@ -98,13 +101,13 @@
<dt class="col-sm-3 text-muted"><%= gettext "Gas Used" %></dt>
<dt class="col-sm-3 text-muted"><%= gettext "Gas Used" %></dt>
<dd class="col-sm-9">
<dd class="col-sm-9">
<span><%= @block.gas_used |> BlockScoutWeb.Cldr.Number.to_string! %></span>
<span><%= @block.gas_used |> BlockScoutWeb.Cldr.Number.to_string! %></span>
<span class="text-muted">(<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> BlockScoutWeb.Cldr.Number.to_string!(format: "#.#%") %>)</span>
<span class="text-muted" data-toggle="tooltip" data-placement="top" title="" data-original-title="Total gas used by all transactions in this block (% used / limit)." >(<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> BlockScoutWeb.Cldr.Number.to_string!(format: "#.#%") %>)</span>
</dt>
</dt>
</dl>
</dl>
<dl class="row mb-0">
<dl class="row mb-0">
<dt class="col-sm-3 text-muted"><%= gettext "Gas Limit" %></dt>
<dt class="col-sm-3 text-muted"><%= gettext "Gas Limit" %></dt>
<dd class="col-sm-9">
<dd class="col-sm-9">
<span><%= BlockScoutWeb.Cldr.Number.to_string!(@block.gas_limit) %></span>
<span data-toggle="tooltip" data-placement="top" title="" data-original-title="The maximum gas allowed in this block." ><%= BlockScoutWeb.Cldr.Number.to_string!(@block.gas_limit) %></span>
</dd>
</dd>
</dl>
</dl>
<% end %>
<% end %>
@ -121,7 +124,7 @@
<h2 class="card-title balance-card-title"><%= gettext "Miner" %></h2>
<h2 class="card-title balance-card-title"><%= gettext "Miner" %></h2>
<div class="text-right">
<div class="text-right">
<!-- Validator's Name -->
<!-- Validator's Name -->
<h3 class="address-balance-text text-truncate">
<h3 class="address-balance-text text-truncate" data-toggle="tooltip" data-offset ="0 15" data-placement="left" title="" data-original-title="Block Miner / Validator Address" >
<%= render BlockScoutWeb.AddressView,
<%= render BlockScoutWeb.AddressView,
"_link.html",
"_link.html",
address: @block.miner,
address: @block.miner,
@ -134,7 +137,9 @@
<!-- Validator Reward or Gas-->
<!-- Validator Reward or Gas-->
<div class="card flex-grow-1 ml-0 ml-md-5 ml-lg-0" >
<div class="card flex-grow-1 ml-0 ml-md-5 ml-lg-0" >
<div class="card-body card-body-flex-column-space-between">
<div class="card-body card-body-flex-column-space-between" data-toggle="tooltip" data-offset ="0 0" data-animation="true" data-placement="left" title="" data-original-title="If Miner: Amount of distributed reward. Miners receive a static block reward + Tx fees + uncle fees.
If POA: Amount of distributed reward. Currently validators receive 1 POA token + TX fees, and the Emission fund receives 1 POA per validated block.
If xDai: Validators receive Tx fees if collected (If transactions exist in the block)">
<%= if show_reward?(@block.rewards) do %>
<%= if show_reward?(@block.rewards) do %>
<h2 class="card-title balance-card-title"><%= gettext "Block Rewards" %></h2>
<h2 class="card-title balance-card-title"><%= gettext "Block Rewards" %></h2>
<div class="text-right">
<div class="text-right">