<%= 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 |
<% end %>