<%= gettext "Transaction Details" %>

<%= @transaction.hash %>

<%= link(gettext("Overview"), to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction.hash), class: "transaction__link transaction__link--active") %>

<%= link(gettext("Logs"), to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction.hash), class: "transaction__link") %>

<%= gettext "Transaction Hash" %>
<%= @transaction.hash %>
<%= gettext "Transaction Status" %>
<%= @transaction.formatted_status %>
<%= gettext "Block Number" %>
<%= link(@transaction.block_number, to: block_path(@conn, :show, @conn.assigns.locale, @transaction.block_number), class: "transaction__link") %> (<%= gettext "%{confirmations} block confirmations", confirmations: @transaction.confirmations %>)
<%= gettext "Age" %>
<%= @transaction.formatted_age %>
<%= gettext "Value" %>
<%= Decimal.div(Decimal.new(@transaction.value), Decimal.new(1_000_000_000_000_000_000)) |> Decimal.to_string(:normal) %> <%= gettext "POA" %>
<%= gettext "From" %>
<%= if @transaction.from_address do %> <%= link(@transaction.from_address.hash, to: address_path(@conn, :show, @conn.assigns.locale, @transaction.from_address.hash), class: "transaction__link") %> <% else %> <%= gettext "Pending" %> <% end %>
<%= gettext "To" %>
<%= if @transaction.to_address do %> <%= link(@transaction.to_address.hash, to: address_path(@conn, :show, @conn.assigns.locale, @transaction.to_address.hash), class: "transaction__link") %> <% else %> <%= gettext "Pending" %> <% end %>
<%= gettext "First Seen" %>
<%= @transaction.first_seen %>
<%= gettext "Last Seen" %>
<%= @transaction.last_seen %>
<%= gettext "Gas Limit" %>
<%= @transaction.gas |> Cldr.Number.to_string! %>
<%= gettext "Gas Price" %>
<%= @transaction.gas_price |> Cldr.Number.to_string! %> (<%= Decimal.div(Decimal.new(@transaction.gas_price), Decimal.new(1_000_000_000)) |> Decimal.to_string(:normal) %> Gwei)
<%= gettext "Cumulative Gas Used" %>
<%= @transaction.cumulative_gas_used %>
<%= gettext "Nonce" %>
<%= @transaction.nonce %>
<%= gettext "Input" %>
<%= @transaction.input %>