<%= gettext("Showing #%{start_block} to #%{end_block}", start_block: List.last(@blocks.entries).number, end_block: List.first(@blocks.entries).number) %>

<%= pagination_links @conn, @blocks, ["en"], view_style: :bulma, first: true, distance: 1, previous: Phoenix.HTML.raw("‹"), next: Phoenix.HTML.raw("›"), path: &block_path/4 %>
<%= for block <- @blocks do %> <% end %>
<%= gettext "Height" %> <%= gettext "Age" %> <%= gettext "Transactions" %> <%= gettext "Gas Used" %> <%= gettext "Gas Limit" %> <%= gettext "Gas Price" %>
<%= link(block.number, to: block_path(@conn, :show, @conn.assigns.locale, block.number), class: "blocks__link") %> <%= block.timestamp |> Timex.from_now %> <%= gettext("%{count} transactions", count: block.transactions |> Enum.count) %> <%= block.gas_used |> Cldr.Number.to_string! %> (<%= block.gas_used / block.gas_limit |> Cldr.Number.to_string!(format: "#.#%") %>) <%= block.gas_limit |> Cldr.Number.to_string! %> <%= block.transactions |> Enum.map(fn(transaction) -> Decimal.to_float(Decimal.div(Decimal.new(transaction.gas_price), Decimal.new(1_000_000_000))) end) |> Math.Enum.mean || 0 |> Cldr.Number.to_string! %> Gwei