<%= gettext "Block #%{number} Details", number: @block.number %>

<%= link(gettext("Overview"), to: block_path(@conn, :show, @conn.assigns.locale, @block.number), class: "block__link block__link--active") %>

<%= link(gettext("Transactions"), to: block_transaction_path(@conn, :index, @conn.assigns.locale, @block.number), class: "block__link") %>

<%= gettext "Number" %>
<%= @block.number %>
<%= gettext "Timestamp" %>
<%= @block.age %> (<%= @block.formatted_timestamp %>)
<%= gettext "Transactions" %>
<%= gettext "%{count} transactions in this block", count: @block.transactions_count %>
<%= gettext "Hash" %>
<%= @block.hash %>
<%= gettext "Parent Hash" %>
<%= link(@block.parent_hash, to: block_path(@conn, :show, @conn.assigns.locale, @block.number - 1), class: "block__link") %>
<%= gettext "Miner" %>
<%= @block.miner %>
<%= gettext "Difficulty" %>
<%= @block.difficulty |> Cldr.Number.to_string! %>
<%= gettext "Total Difficulty" %>
<%= @block.total_difficulty |> Cldr.Number.to_string! %>
<%= gettext "Size" %>
<%= Cldr.Unit.new(:byte, @block.size) |> Cldr.Unit.to_string! %>
<%= gettext "Gas Used" %>
<%= @block.gas_used |> Cldr.Number.to_string! %> (<%= @block.gas_used / @block.gas_limit |> Cldr.Number.to_string!(format: "#.#%") %>)
<%= gettext "Gas Limit" %>
<%= @block.gas_limit |> Cldr.Number.to_string! %>
<%= gettext "Nonce" %>
<%= @block.nonce %>