Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blockscout/lib/explorer_web/templates/transaction/show.html.eex

103 lines
5.7 KiB

<section class="container__section transaction">
<div class="transaction__header">
<h1 class="transaction__heading"><%= gettext "Transaction Details" %></h1>
<h3 class="transaction__subheading"><%= @transaction.hash %></h3>
</div>
<div class="transaction__container">
<div class="transaction__tabs">
<h2 class="transaction__tab transaction__tab--active"><%= link(gettext("Overview"), to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction.hash), class: "transaction__link transaction__link--active") %></h2>
<h2 class="transaction__tab"><%= link(gettext("Logs"), to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction.hash), class: "transaction__link") %></h2>
</div>
<div class="transaction__attributes">
<div class="transaction__column">
<dl>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Transaction Hash" %></dt>
<dd class="transaction__item-value" title="<%= @transaction.hash %>"><%= @transaction.hash %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Transaction Status" %></dt>
<dd class="transaction__item-value transaction__item-value--status">
<div class="transaction__status">
<div><%= @transaction.formatted_status %></div>
<div class="transaction__icon transaction__icon--<%= @transaction.status %>"></div>
</div>
</dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Block Number" %></dt>
<dd class="transaction__item-value">
<span class="transaction__item--primary">
<%= link(@transaction.block_number, to: block_path(@conn, :show, @conn.assigns.locale, @transaction.block_number), class: "transaction__link") %>
</span>
<span class="transaction__item--secondary">
(<%= gettext "%{confirmations} block confirmations", confirmations: @transaction.confirmations %>)
</span>
</dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Age" %></dt>
<dd class="transaction__item-value" title="<%= @transaction.formatted_timestamp %>"><%= @transaction.formatted_age %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Value" %></dt>
<dd class="transaction__item-value"><%= Decimal.div(Decimal.new(@transaction.value), Decimal.new(1_000_000_000_000_000_000)) |> Decimal.to_string(:normal) %> <%= gettext "POA" %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "From" %></dt>
<dd class="transaction__item-value">
<%= 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 %>
</dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "To" %></dt>
<dd class="transaction__item-value">
<%= 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 %>
</dd>
</div>
</dl>
</div>
<div class="transaction__column">
<dl>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "First Seen" %></dt>
<dd class="transaction__item-value" title="<%= @transaction.first_seen %>"><%= @transaction.first_seen %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Last Seen" %></dt>
<dd class="transaction__item-value" title="<%= @transaction.last_seen %>"><%= @transaction.last_seen %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Gas Limit" %></dt>
7 years ago
<dd class="transaction__item-value"><%= @transaction.gas |> Cldr.Number.to_string! %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Gas Price" %></dt>
7 years ago
<dd class="transaction__item-value"><%= @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)</dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Cumulative Gas Used" %></dt>
<dd class="transaction__item-value"><%= @transaction.cumulative_gas_used %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Nonce" %></dt>
<dd class="transaction__item-value"><%= @transaction.nonce %></dd>
</div>
<div class="transaction__item">
<dt class="transaction__item-key"><%= gettext "Input" %></dt>
<dd class="transaction__item-value" title="<%= @transaction.input %>"><%= @transaction.input %></dd>
</div>
</dl>
</div>
</div>
</div>
</section>