Transaction detail #369
pull/475/head
Jimmy Lauzau 6 years ago committed by GitHub
commit 2582d0504b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      apps/explorer_web/assets/css/_typography.scss
  2. 2
      apps/explorer_web/lib/explorer_web/templates/address/_responsive_hash.html.eex
  3. 8
      apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex
  4. 24
      apps/explorer_web/lib/explorer_web/templates/address_transaction/_transaction.html.eex
  5. 39
      apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex
  6. 36
      apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex
  7. 295
      apps/explorer_web/lib/explorer_web/templates/transaction/overview.html.eex
  8. 20
      apps/explorer_web/lib/explorer_web/templates/transaction_internal_transaction/_internal_transaction.html.eex
  9. 145
      apps/explorer_web/lib/explorer_web/templates/transaction_internal_transaction/index.html.eex
  10. 120
      apps/explorer_web/lib/explorer_web/templates/transaction_log/index.html.eex
  11. 129
      apps/explorer_web/priv/gettext/default.pot
  12. 129
      apps/explorer_web/priv/gettext/en/LC_MESSAGES/default.po
  13. 6
      apps/explorer_web/test/explorer_web/features/pages/transaction_page.ex
  14. 13
      apps/explorer_web/test/explorer_web/features/viewing_transactions_test.exs

@ -60,3 +60,26 @@ a {
border-bottom: 1px dashed currentColor;
display: inline-block;
}
.text {
&-transaction {
color: $blue;
}
&-contract-call {
color: $green;
}
&-contract-creation {
color: $pink;
}
&-token {
color: $orange;
}
&-internal-transaction {
color: $teal;
}
}

@ -1,4 +1,4 @@
<span class="<%= if @contract do %>contract-address<% end %>">
<span class="d-none d-md-none d-lg-inline"><%= @address_hash %></span>
<span class="d-md-block d-lg-none "><%= ExplorerWeb.AddressView.trimmed_hash(@address_hash) %></span>
<span class="d-md-inline-block d-lg-none "><%= ExplorerWeb.AddressView.trimmed_hash(@address_hash) %></span>
</span>

@ -1,9 +1,9 @@
<div class="tile tile-type-internal-transaction fade-in" data-test="internal_transaction" data-internal-transaction-id="<%= @internal_transaction.id %>">
<div class="row">
<div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label">
<div class="row justify-content-end">
<div class="col-md-3 col-lg-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label">
<%= gettext("Internal Transaction") %>
</div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<div class="col-md-9 col-lg-7 d-flex flex-column text-nowrap">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @internal_transaction.transaction_hash %>
<span>
<%= if @address.hash == @internal_transaction.from_address_hash do %>
@ -24,7 +24,7 @@
<span class="badge badge-success tile-badge"><%= gettext "IN" %></span>
<% end %>
</div>
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start text-md-right">
<div class="col-md-9 col-lg-3 d-flex flex-row flex-md-column justify-content-start text-lg-right mt-3 mt-lg-0">
<span class="tile-title">
<%= ExplorerWeb.TransactionView.value(@internal_transaction, include_label: false) %> <%= gettext "Ether" %>
</span>

@ -1,14 +1,16 @@
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(@transaction) %> fade-in tile-status--<%= ExplorerWeb.TransactionView.status(@transaction) %>" data-transaction-hash="<%= @transaction.hash %>">
<div class="row">
<div class="pl-5 col-md-2 d-flex flex-column align-items-left justify-content-start justify-content-lg-center">
<span class="tile-label">
<%= ExplorerWeb.TransactionView.transaction_display_type(@transaction) %>
</span>
<div class="tile-status-label" data-test="transaction_status">
<%= ExplorerWeb.TransactionView.formatted_status(@transaction) %>
<div class="row justify-content-end">
<div class="col-md-3 col-lg-2 d-flex align-items-lg-center">
<div class="d-flex flex-md-column ml-md-4">
<span class="tile-label mr-1 mr-md-0">
<%= ExplorerWeb.TransactionView.transaction_display_type(@transaction) %>
</span>
<span class="tile-status-label" data-test="transaction_status">
<%= ExplorerWeb.TransactionView.formatted_status(@transaction) %>
</span>
</div>
</div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<div class="col-md-9 col-lg-7 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @transaction.hash %>
<span>
<%= if @address.hash == @transaction.from_address_hash do %>
@ -40,11 +42,11 @@
</span>
</span>
</div>
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start align-items-end text-md-right">
<span class="tile-title">
<div class="col-md-9 col-lg-3 d-flex flex-column flex-md-row flex-lg-column justify-content-start text-lg-right mt-3 mt-lg-0">
<span class="tile-title mr-1 mr-lg-0">
<%= ExplorerWeb.TransactionView.value(@transaction, include_label: false) %> <%= gettext "Ether" %>
</span>
<span class="mr-2 mr-sm-0 text-muted"> <%= ExplorerWeb.TransactionView.formatted_fee(@transaction, denomination: :ether) %> <%= gettext "Fee" %></span>
<span> <%= ExplorerWeb.TransactionView.formatted_fee(@transaction, denomination: :ether) %> <%= gettext "Fee" %></span>
</div>
</div>
</div>

@ -1,6 +1,8 @@
<section class="container">
<div class="card">
<div class="card-header">
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-md-inline-flex">
<li class="nav-item">
<%= link(
@ -18,6 +20,26 @@
) %>
</li>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-md-none">
<li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext("Pending") %></a>
<div class="dropdown-menu">
<%= link(
gettext("Validated"),
class: "dropdown-item",
to: transaction_path(@conn, :index, @conn.assigns.locale)
) %>
<%= link(
gettext("Pending"),
class: "dropdown-item",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index, @conn.assigns.locale)
) %>
</div>
</li>
</ul>
</div>
<div class="card-body">
@ -26,14 +48,14 @@
<%= for transaction <- @transactions do %>
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>">
<div class="row" data-test="chain_transaction">
<div class="col-md-2 d-flex flex-column align-items-left justify-content-start justify-content-lg-center tile-label">
<div class="ml-4">
<span data-test="transaction_type"> <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %></span>
<div data-test="transaction_status" class="text-muted"><%= ExplorerWeb.TransactionView.formatted_status(transaction) %></div>
<div class="row justify-content-end" data-test="chain_transaction">
<div class="col-md-3 col-lg-2 d-flex align-items-lg-center">
<div class="d-flex flex-md-column ml-md-4">
<span class="tile-label mr-1 mr-md-0" data-test="transaction_type"> <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %></span>
<div data-test="transaction_status"><%= ExplorerWeb.TransactionView.formatted_status(transaction) %></div>
</div>
</div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<div class="col-md-9 col-lg-7 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), locale: @locale %>
@ -44,7 +66,10 @@
<%= gettext("Contract Address Pending") %>
<% end %>
</span>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> <%= gettext "Ether" %>
</div>
<div class="col-md-9 col-lg-3 d-flex flex-column flex-md-row flex-lg-column justify-content-start text-lg-right mt-3 mt-lg-0">
<span class="tile-title mr-1 mr-lg-0"><%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> <%= gettext "Ether" %></span>
<span> <%= ExplorerWeb.TransactionView.formatted_fee(transaction, denomination: :ether) %> <%= gettext "Fee" %></span>
</div>
</div>
</div>

@ -1,6 +1,8 @@
<section class="container">
<div class="card">
<div class="card-header">
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-md-inline-flex">
<li class="nav-item">
<%= link(
@ -18,6 +20,26 @@
) %>
</li>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-md-none">
<li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext("Validated") %></a>
<div class="dropdown-menu">
<%= link(
gettext("Validated"),
class: "dropdown-item",
to: transaction_path(@conn, :index, @conn.assigns.locale)
) %>
<%= link(
gettext("Pending"),
class: "dropdown-item",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index, @conn.assigns.locale)
) %>
</div>
</li>
</ul>
</div>
<div class="card-body">
@ -26,14 +48,14 @@
<%= for transaction <- @transactions do %>
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %> tile-status--<%= ExplorerWeb.TransactionView.status(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>">
<div class="row" data-test="chain_transaction">
<div class="col-md-2 d-flex flex-column align-items-left justify-content-start justify-content-lg-center">
<div class="ml-4">
<span class="tile-label" data-test="transaction_type"> <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %></span>
<div class="row justify-content-end" data-test="chain_transaction">
<div class="col-md-3 col-lg-2 d-flex align-items-lg-center">
<div class="d-flex flex-md-column ml-md-4">
<span class="tile-label mr-1 mr-md-0" data-test="transaction_type"> <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %></span>
<div class="tile-status-label" data-test="transaction_status"><%= ExplorerWeb.TransactionView.formatted_status(transaction) %></div>
</div>
</div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<div class="col-md-9 col-lg-7 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), locale: @locale %>
@ -50,8 +72,8 @@
</span>
</span>
</div>
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start text-md-right">
<span class="tile-title"><%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> <%= gettext "Ether" %></span>
<div class="col-md-9 col-lg-3 d-flex flex-column flex-md-row flex-lg-column justify-content-start text-lg-right mt-3 mt-lg-0">
<span class="tile-title mr-1 mr-lg-0"><%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> <%= gettext "Ether" %></span>
<span> <%= ExplorerWeb.TransactionView.formatted_fee(transaction, denomination: :ether) %> <%= gettext "Fee" %></span>
</div>
</div>

@ -1,202 +1,109 @@
<% block = @transaction.block %>
<section>
<div class="row mb-3">
<div class="col-md-2 col-lg-1 order-last order-sm-first">
<div class="card mt-3 mt-sm-0">
<div class="card-body px-2 py-2">
<img src="data:image/png;base64, <%= qr_code(@transaction) %>" class="qr-code" alt="qr_code" title="<%= @transaction %>" />
<div class="row">
<div class="col-md-8">
<!-- Block Details -->
<div class="card">
<div class="card-body">
<h1 class="card-title"><%= gettext "Transaction Details" %> </h1>
<h3 data-test="transaction_detail_hash"><%= @transaction %> </h3>
<span class="d-block mb-2">
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: @transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.from_address), locale: @locale %>
<span class="text-muted"> &rarr; </span>
<%= if @transaction.to_address_hash do %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: @transaction.to_address_hash, contract: ExplorerWeb.AddressView.contract?(@transaction.to_address), locale: @locale %>
<% else %>
<%= gettext("Contract Address Pending") %>
<% end %>
</span>
<div class="d-flex flex-row justify-content-start text-muted">
<span class="mr-4 text-<%= ExplorerWeb.TransactionView.type_suffix(@transaction) %>"><%= ExplorerWeb.TransactionView.transaction_display_type(@transaction) %></span>
<span class="mr-4"><%= ExplorerWeb.TransactionView.formatted_status(@transaction) %></span>
<span class="mr-4">
<%= if block do %>
<span data-from-now="<%= @transaction.block.timestamp %>"></span>
<% end %>
</span>
</div>
<hr>
<!-- Block Hash -->
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Block Number" %> </dt>
<dd class="col-sm-9">
<%= if block do %>
<%= link(
block,
class: "transaction__link",
to: block_path(@conn, :show, @conn.assigns.locale, block)
) %>
<% else %>
<%= gettext "Pending" %>
<% end %>
</dd>
</dl>
<dl class="row">
<dt class="col-sm-3 text-muted"> <%= gettext "Block Confirmations" %> </dt>
<dd class="col-sm-9">
<span data-selector="block-confirmations"><%= confirmations(@transaction, max_block_number: @max_block_number) %></span>
</dd>
</dl>
<!-- Nonce -->
<dl class="row">
<dt class="col-sm-3 text-muted"> <%= gettext "Nonce" %> </dt>
<dd class="col-sm-9"> <%= @transaction.nonce %> </dd>
</dl>
<!-- TX Fee -->
<dl class="row">
<dt class="col-sm-3 text-muted"> <%= gettext "TX Fee" %> </dt>
<dd class="col-sm-9"> <%= formatted_fee(@transaction, denomination: :ether) %> (<%= formatted_fee(@transaction, exchange_rate: @exchange_rate) %>)</dd>
</dl>
<!-- Input -->
<dl class="row mb-0">
<dt class="col-sm-3 text-muted"> <%= gettext "Input" %> </dt>
<dd class="col-sm-9">
<div class="tile tile-muted">
<pre class="pre-scrollable pre-scrollable-shorty pre-wrap mb-0">
<code>
<%= @transaction.input %>
</code>
</pre>
</div>
</dd>
</dl>
</div>
</div>
</div>
<div class="col-sm-10 align-self-center">
<h1><%= gettext "Transaction Details" %></h1>
<p class="mb-0" data-test="transaction_detail_hash"><%= @transaction %></p>
</div>
</div>
<div class="card mb-3">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<table class="table table-font table-responsive-sm table-horizontal">
<tbody>
<tr>
<th scope="row">
<%= gettext "Transaction Status" %>
</th>
<td>
<%= ExplorerWeb.TransactionView.formatted_status(@transaction) %>
<div class="transaction__dot transaction__dot--<%= ExplorerWeb.TransactionView.status(@transaction) %>"></div>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Block Number" %>
</th>
<td>
<% block = @transaction.block %>
<%= if block do %>
<%= link(
block,
class: "transaction__link",
"data-selector": "block-number",
to: block_path(@conn, :show, @conn.assigns.locale, block)
) %>
<% end %>
( <span data-selector="block-confirmations">
<%= confirmations(@transaction, max_block_number: @max_block_number) %>
</span> <%= gettext "block confirmations" %>)
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Age" %>
</th>
<td>
<%= if block do %>
<span data-from-now="<%= @transaction.block.timestamp %>"></span> (<%= formatted_timestamp(@transaction.block) %>)
<% else %>
<%= gettext "Pending" %>
<% end %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Ether" %> <%= gettext "Value" %>
</th>
<td>
<div><%= value(@transaction) %> </div>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "USD" %> <%= gettext "Value" %>
</th>
<td>
<div><%= formatted_usd_value(@transaction, @exchange_rate) %></div>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "From" %>
</th>
<td>
<%= link(
@transaction.from_address,
class: "transaction__link",
to: address_path(@conn, :show, @conn.assigns.locale, @transaction.from_address)
) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "To" %>
</th>
<td>
<%= cond do %>
<% @transaction.to_address_hash != nil -> %>
<%= link(
@transaction.to_address,
class: "transaction__link",
to: address_path(@conn, :show, @conn.assigns.locale, @transaction.to_address)
) %>
<% @transaction.created_contract_address_hash != nil -> %>
<i class="fas fa-plus-square"></i> Contract <%= link(
@transaction.created_contract_address_hash,
class: "transaction__link",
"data-test": "created_contract_address_hash",
to: address_path(@conn, :show, @conn.assigns.locale, @transaction.created_contract_address_hash)
) %> Created
<% @transaction.to_address_hash == nil -> %>
<%= gettext "Contract Creation" %>
<% true -> %>
<% end %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Nonce" %>
</th>
<td>
<%= @transaction.nonce %>
</td>
</tr>
</tbody>
</table>
<!-- Value -->
<div class="col-md-4">
<div class="card bg-primary">
<div class="card-body">
<h2 class="card-title text-white"><%= gettext "Ether" %> <%= gettext "Value" %></h2>
<div class="text-right">
<h3 class="text-white"> <%= value(@transaction) %></h3>
<span class="text-light"> <%= formatted_usd_value(@transaction, @exchange_rate) %></span>
</div>
</div>
<div class="col-md-6">
<table class="table table-font table-responsive-sm table-horizontal">
<tbody>
<tr>
<th scope="row">
<%= gettext "First Seen" %>
</th>
<td data-from-now="<%= @transaction.inserted_at %>"></td>
</tr>
<tr>
<th scope="row">
<%= gettext "Last Seen" %>
</th>
<td data-from-now="<%= @transaction.updated_at %>"></td>
</tr>
<tr>
<th scope="row">
<%= gettext "Gas Limit" %>
</th>
<td title="<%= format_gas_limit(@transaction.gas) %>">
<%= format_gas_limit(@transaction.gas) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Gas Price" %>
</th>
<td title="<%= gas_price(@transaction, :ether) %>">
<%= gas_price(@transaction, :ether) %>
(<%= gas_price(@transaction, :gwei) %>)
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Ether" %> <%= gettext "TX Fee" %>
</th>
<td>
<div><%= formatted_fee(@transaction, denomination: :ether) %></div>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "USD" %> <%= gettext "TX Fee" %>
</th>
<td>
<div><%= formatted_fee(@transaction, exchange_rate: @exchange_rate) %></div>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Gas Used" %>
</th>
<td title="<%= gas_used(@transaction) %>">
<%= gas_used(@transaction) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Input" %>
</th>
<td title="<%= @transaction.input %>">
<div class="card bg-light">
<div class="card-body">
<pre class="pre-scrollable pre-scrollable-shorty pre-wrap mb-0">
<code>
<%= @transaction.input %>
</code>
</pre>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Gas -->
<div class="card">
<div class="card-body">
<h2 class="card-title"> <%= gettext "Gas" %> </h2>
<div class="text-right">
<!-- Gas Used -->
<h3>
<span>
<%= gettext "Used" %>
<%= gas_used(@transaction) %> @
<%= gas_price(@transaction, :gwei) %>
</span>
</h3>
<!-- Gas Limit -->
<span class="text-muted">
<%= gettext "Limit" %>
<%= format_gas_limit(@transaction.gas) %>
</span>
</div>
</div>
</div>

@ -0,0 +1,20 @@
<div class="tile tile-type-internal-transaction fade-in" data-test="internal_transaction" data-internal-transaction-id="<%= @internal_transaction.id %>">
<div class="row justify-content-end">
<div class="col-md-3 col-lg-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label">
<%= gettext("Internal Transaction") %>
</div>
<div class="col-md-9 col-lg-10 d-flex flex-column text-nowrap">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: @internal_transaction.transaction_hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: @internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(@internal_transaction.from_address), locale: @locale %>
&rarr;
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.InternalTransactionView.to_address_hash(@internal_transaction), contract: ExplorerWeb.AddressView.contract?(@internal_transaction.to_address), locale: @locale %>
</span>
<span class="tile-title text-truncate">
<%= ExplorerWeb.TransactionView.value(@internal_transaction, include_label: false) %>
<%= gettext "Ether" %>
</span>
</div>
</div>
</div>

@ -1,83 +1,72 @@
<section class="container-fluid">
<section class="container">
<%= render ExplorerWeb.TransactionView, "overview.html", assigns %>
<section>
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link active",
to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Logs"),
class: "nav-link",
to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction),
"data-test": "transaction_logs_link"
) %>
</li>
</ul>
</div>
<div class="card-body">
<%= if Enum.count(@internal_transactions) > 0 do %>
<table class="table table-responsive-sm table-font">
<thead>
<th><%= gettext "Type" %></th>
<th><%= gettext "From" %></th>
<th><%= gettext "To" %></th>
<th><%= gettext "Value" %> (<%= gettext "Ether" %>)</th>
<th><%= gettext "Gas Used" %></th>
</thead>
<div class="card">
<div class="card-header">
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-md-inline-flex">
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link active",
to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Logs"),
class: "nav-link",
to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction),
"data-test": "transaction_logs_link"
) %>
</li>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-md-none">
<li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext("Internal Transactions") %></a>
<div class="dropdown-menu">
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item",
to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction)
) %>
<%= link(
gettext("Logs"),
class: "dropdown-item",
to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction),
"data-test": "transaction_logs_link"
) %>
</div>
</li>
</ul>
</div>
<div class="card-body">
<h2 class="card-title"><%= gettext "Internal Transactions" %></h2>
<%= if Enum.count(@internal_transactions) > 0 do %>
<%= for internal_transaction <- @internal_transactions do %>
<tgroup>
<tr>
<td><%= internal_transaction.type %></td>
<td>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: internal_transaction.from_address_hash, contract: ExplorerWeb.AddressView.contract?(internal_transaction.from_address), locale: @locale %>
</td>
<td>
<%= if ExplorerWeb.InternalTransactionView.create?(internal_transaction) do %>
<i class="fas fa-plus-square"></i>
<%= link(
gettext("Contract Creation"),
class: "transaction__link",
"data-address-hash": internal_transaction.created_contract_address_hash,
to: address_path(ExplorerWeb.Endpoint, :show, @locale, internal_transaction.created_contract_address_hash),
title: internal_transaction.created_contract_address_hash
) %>
<% else %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: internal_transaction.to_address_hash, contract: ExplorerWeb.AddressView.contract?(internal_transaction.to_address), locale: @locale %>
<% end %>
</td>
<td><%= ExplorerWeb.TransactionView.value(internal_transaction, include_label: false) %></td>
<td><%= ExplorerWeb.TransactionView.gas(internal_transaction) %></td>
</tr>
</tgroup>
<%= render "_internal_transaction.html", locale: @locale, internal_transaction: internal_transaction %>
<% end %>
</table>
<% else %>
<p><%= gettext "There are no Internal Transactions" %></p>
<% end %>
<% else %>
<div class="tile tile-muted text-center">
<span><%= gettext "There are no internal transactions for this transaction." %></span>
</div>
<% end %>
</div>
</div>
</div>
<%= if @next_page_params do %>
<%= link(
gettext("Newer"),
class: "button button--secondary button--sm u-float-right mt-3",
to: transaction_internal_transaction_path(
@conn,
:index,
@conn.assigns.locale,
@transaction,
@next_page_params
)
) %>
<% end %>
</section>
</section>
<%= if @next_page_params do %>
<%= link(
gettext("Newer"),
class: "button button--secondary button--sm u-float-right mt-3",
to: transaction_internal_transaction_path(
@conn,
:index,
@conn.assigns.locale,
@transaction,
@next_page_params
)
) %>
<% end %>
</section>

@ -1,8 +1,7 @@
<section class="container-fluid">
<section class="container">
<%= render ExplorerWeb.TransactionView, "overview.html", assigns %>
<section>
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
@ -23,63 +22,74 @@
</ul>
</div>
<div class="card-body">
<h2 class="card-title"><%= gettext "Logs" %></h2>
<%= if Enum.count(@logs) > 0 do %>
<table class="table table-responsive-sm table-font">
<thead>
<th><%= gettext "Address" %></th>
<th><%= gettext "Topic" %></th>
</thead>
<%= for log <- @logs do %>
<tgroup>
<tr data-test="transaction_log">
<td>
<%= for log <- @logs do %>
<div data-test="transaction_log" class="tile tile-muted">
<dl class="row">
<dt class="col-md-1"> Address </dt>
<dd class="col-md-11">
<h3 class="">
<%= link(
log.address,
to: address_path(@conn, :show, @conn.assigns.locale, log.address),
"data-test": "log_address_link",
"data-address-hash": log.address
) %>
</td>
<td><%= log.first_topic %></td>
</tr>
<% unless is_nil(log.second_topic) do %>
<tr>
<td>topic[1]</td>
<td><%= log.second_topic %></td>
</tr>
<% end %>
<% unless is_nil(log.third_topic) do %>
<tr>
<td>topic[2]</td>
<td><%= log.third_topic %></td>
</tr>
<% end %>
<% unless is_nil(log.data) do %>
<tr>
<td>↠</td>
<td><%= log.data %></td>
</tr>
<% end %>
</tgroup>
<% end %>
</table>
log.address,
to: address_path(@conn, :show, @conn.assigns.locale, log.address),
"data-test": "log_address_link",
"data-address-hash": log.address
) %>
</h3>
</dd>
<dt class="col-md-1"> Topics </dt>
<dd class="col-md-11">
<%= unless is_nil(log.first_topic) do %>
<div class="text-dark">
<span class="text-dark">[0]</span>
<%= log.first_topic %>
</div>
<% end %>
<%= unless is_nil(log.second_topic) do %>
<div class="text-dark">
<span class="">[1] </span>
<%= log.second_topic %>
</div>
<% end %>
<%= unless is_nil(log.third_topic) do %>
<div class="text-dark">
<span>[2]</span>
<%= log.third_topic %>
</div>
<% end %>
</dd>
<dt class="col-md-1">
Data
</dt>
<dd class="col-md-11">
<%= unless is_nil(log.data) do %>
<div class="text-dark">
<%= log.data %>
</div>
<% end %>
</dd>
</dl>
</div>
<% end %>
<% else %>
<p><%= gettext "There are no logs currently." %></p>
<div class="tile tile-muted text-center">
<span><%= gettext "There are no logs for this transaction." %></span>
</div>
<% end %>
<%= if @next_page_params do %>
<%= link(
gettext("Newer"),
class: "button button--secondary button--sm u-float-right mt-3",
to: transaction_log_path(
@conn,
:index,
@conn.assigns.locale,
@transaction,
@next_page_params
)
) %>
<% end %>
</div>
</div>
<%= if @next_page_params do %>
<%= link(
gettext("Newer"),
class: "button button--secondary button--sm u-float-right mt-3",
to: transaction_log_path(
@conn,
:index,
@conn.assigns.locale,
@transaction,
@next_page_params
)
) %>
<% end %>
</section>
</section>

@ -1,5 +1,4 @@
#: lib/explorer_web/templates/block/index.html.eex:18
#: lib/explorer_web/templates/transaction/overview.html.eex:52
msgid "Age"
msgstr ""
@ -18,8 +17,6 @@ msgstr ""
#: lib/explorer_web/templates/block/index.html.eex:20
#: lib/explorer_web/templates/block/overview.html.eex:84
#: lib/explorer_web/templates/transaction/overview.html.eex:176
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:34
msgid "Gas Used"
msgstr ""
@ -49,14 +46,12 @@ msgstr ""
#: lib/explorer_web/templates/block_transaction/index.html.eex:36
#: lib/explorer_web/templates/chain/_transactions.html.eex:4
#: lib/explorer_web/templates/layout/_topnav.html.eex:18
#: lib/explorer_web/templates/pending_transaction/index.html.eex:24
#: lib/explorer_web/templates/transaction/index.html.eex:24
#: lib/explorer_web/templates/pending_transaction/index.html.eex:46
#: lib/explorer_web/templates/transaction/index.html.eex:46
msgid "Transactions"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:64
#: lib/explorer_web/templates/transaction/overview.html.eex:72
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
#: lib/explorer_web/templates/transaction/overview.html.eex:81
msgid "Value"
msgstr ""
@ -70,7 +65,6 @@ msgstr ""
#: lib/explorer_web/templates/block/index.html.eex:21
#: lib/explorer_web/templates/block/overview.html.eex:92
#: lib/explorer_web/templates/transaction/overview.html.eex:143
msgid "Gas Limit"
msgstr ""
@ -79,7 +73,7 @@ msgid "Miner"
msgstr ""
#: lib/explorer_web/templates/block/overview.html.eex:59
#: lib/explorer_web/templates/transaction/overview.html.eex:117
#: lib/explorer_web/templates/transaction/overview.html.eex:52
msgid "Nonce"
msgstr ""
@ -103,11 +97,11 @@ msgstr ""
msgid "Total Difficulty"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:33
#: lib/explorer_web/templates/transaction/overview.html.eex:31
msgid "Block Number"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:11
#: lib/explorer_web/templates/transaction/overview.html.eex:8
msgid "Transaction Details"
msgstr ""
@ -117,15 +111,15 @@ msgstr ""
#: lib/explorer_web/templates/block/index.html.eex:20
#: lib/explorer_web/templates/block/index.html.eex:21
#: lib/explorer_web/templates/transaction/overview.html.eex:92
msgid "Gas"
msgstr ""
#: lib/explorer_web/templates/block/index.html.eex:22
#: lib/explorer_web/templates/transaction/overview.html.eex:151
msgid "Gas Price"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:184
#: lib/explorer_web/templates/transaction/overview.html.eex:63
msgid "Input"
msgstr ""
@ -137,15 +131,12 @@ msgstr ""
msgid "%{count} transactions in this block"
msgstr ""
#: lib/explorer_web/templates/transaction_log/index.html.eex:29
#: lib/explorer_web/views/address_view.ex:15
msgid "Address"
msgstr ""
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:106
#: lib/explorer_web/templates/address_transaction/index.html.eex:117
#: lib/explorer_web/templates/transaction/overview.html.eex:80
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:31
#: lib/explorer_web/views/address_internal_transaction_view.ex:10
#: lib/explorer_web/views/address_transaction_view.ex:10
msgid "From"
@ -162,8 +153,6 @@ msgstr ""
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:94
#: lib/explorer_web/templates/address_transaction/index.html.eex:105
#: lib/explorer_web/templates/transaction/overview.html.eex:92
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:32
#: lib/explorer_web/views/address_internal_transaction_view.ex:9
#: lib/explorer_web/views/address_transaction_view.ex:9
msgid "To"
@ -204,9 +193,12 @@ msgstr ""
msgid "Showing %{count} Transactions"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/overview.html.eex:58
#: lib/explorer_web/templates/pending_transaction/index.html.eex:16
#: lib/explorer_web/templates/pending_transaction/index.html.eex:27
#: lib/explorer_web/templates/pending_transaction/index.html.eex:35
#: lib/explorer_web/templates/transaction/index.html.eex:16
#: lib/explorer_web/templates/transaction/index.html.eex:35
#: lib/explorer_web/templates/transaction/overview.html.eex:40
#: lib/explorer_web/views/transaction_view.ex:38
#: lib/explorer_web/views/transaction_view.ex:69
msgid "Pending"
@ -221,11 +213,13 @@ msgid "Last Seen"
msgstr ""
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:18
#: lib/explorer_web/templates/transaction_log/index.html.eex:18
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:37
#: lib/explorer_web/templates/transaction_log/index.html.eex:17
#: lib/explorer_web/templates/transaction_log/index.html.eex:25
msgid "Logs"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:25
#: lib/explorer_web/templates/pending_transaction/index.html.eex:47
msgid "Showing %{count} Pending Transactions"
msgstr ""
@ -291,14 +285,13 @@ msgstr ""
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:29
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:45
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:47
#: lib/explorer_web/templates/block_transaction/_transaction.html.eex:33
#: lib/explorer_web/templates/chain/_transactions.html.eex:33
#: lib/explorer_web/templates/pending_transaction/index.html.eex:47
#: lib/explorer_web/templates/transaction/index.html.eex:54
#: lib/explorer_web/templates/transaction/overview.html.eex:64
#: lib/explorer_web/templates/transaction/overview.html.eex:160
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
#: lib/explorer_web/templates/pending_transaction/index.html.eex:71
#: lib/explorer_web/templates/transaction/index.html.eex:76
#: lib/explorer_web/templates/transaction/overview.html.eex:81
#: lib/explorer_web/templates/transaction_internal_transaction/_internal_transaction.html.eex:16
#: lib/explorer_web/views/wei_helpers.ex:71
msgid "Ether"
msgstr ""
@ -316,7 +309,10 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:20
#: lib/explorer_web/templates/address_transaction/index.html.eex:60
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:11
#: lib/explorer_web/templates/transaction_log/index.html.eex:11
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:29
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:32
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:47
#: lib/explorer_web/templates/transaction_log/index.html.eex:10
msgid "Internal Transactions"
msgstr ""
@ -359,15 +355,19 @@ msgstr ""
msgid "All"
msgstr ""
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:47
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:49
#: lib/explorer_web/templates/block_transaction/_transaction.html.eex:35
#: lib/explorer_web/templates/chain/_transactions.html.eex:35
#: lib/explorer_web/templates/transaction/index.html.eex:55
#: lib/explorer_web/templates/pending_transaction/index.html.eex:72
#: lib/explorer_web/templates/transaction/index.html.eex:77
msgid "Fee"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:7
#: lib/explorer_web/templates/transaction/index.html.eex:7
#: lib/explorer_web/templates/pending_transaction/index.html.eex:9
#: lib/explorer_web/templates/pending_transaction/index.html.eex:30
#: lib/explorer_web/templates/transaction/index.html.eex:9
#: lib/explorer_web/templates/transaction/index.html.eex:27
#: lib/explorer_web/templates/transaction/index.html.eex:30
msgid "Validated"
msgstr ""
@ -395,8 +395,6 @@ msgstr ""
msgid "Price"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:72
#: lib/explorer_web/templates/transaction/overview.html.eex:168
#: lib/explorer_web/views/currency_helpers.ex:32
msgid "USD"
msgstr ""
@ -409,7 +407,7 @@ msgstr ""
msgid "Dashboard"
msgstr ""
#: lib/explorer_web/templates/transaction/index.html.eex:25
#: lib/explorer_web/templates/transaction/index.html.eex:47
msgid "Showing %{count} Validated Transactions"
msgstr ""
@ -450,8 +448,7 @@ msgstr ""
msgid "View All"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:160
#: lib/explorer_web/templates/transaction/overview.html.eex:168
#: lib/explorer_web/templates/transaction/overview.html.eex:57
msgid "TX Fee"
msgstr ""
@ -475,8 +472,8 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:146
#: lib/explorer_web/templates/block/index.html.eex:60
#: lib/explorer_web/templates/block_transaction/index.html.eex:51
#: lib/explorer_web/templates/pending_transaction/index.html.eex:54
#: lib/explorer_web/templates/transaction/index.html.eex:62
#: lib/explorer_web/templates/pending_transaction/index.html.eex:79
#: lib/explorer_web/templates/transaction/index.html.eex:84
msgid "Older"
msgstr ""
@ -510,14 +507,12 @@ msgid "Last Updated In Block"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:71
#: lib/explorer_web/templates/transaction_log/index.html.eex:73
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:61
#: lib/explorer_web/templates/transaction_log/index.html.eex:82
msgid "Newer"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:110
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:47
#: lib/explorer_web/views/transaction_view.ex:111
msgid "Contract Creation"
msgstr ""
@ -572,11 +567,6 @@ msgstr ""
msgid "Wallet addresses"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:47
msgid "block confirmations"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/address_transaction/index.html.eex:89
msgid "Connection Lost, click to load newer transactions"
@ -590,6 +580,7 @@ msgstr ""
#, elixir-format
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:4
#: lib/explorer_web/templates/transaction_internal_transaction/_internal_transaction.html.eex:4
msgid "Internal Transaction"
msgstr ""
@ -616,7 +607,8 @@ msgid "There are no transactions for this address."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/pending_transaction/index.html.eex:44
#: lib/explorer_web/templates/pending_transaction/index.html.eex:66
#: lib/explorer_web/templates/transaction/overview.html.eex:16
msgid "Contract Address Pending"
msgstr ""
@ -636,24 +628,24 @@ msgid "at"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:37
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:39
#: lib/explorer_web/templates/block_transaction/_transaction.html.eex:25
#: lib/explorer_web/templates/chain/_transactions.html.eex:25
#: lib/explorer_web/templates/transaction/index.html.eex:47
#: lib/explorer_web/templates/transaction/index.html.eex:69
msgid "Block #%{number}"
msgstr ""
#, elixir-format
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:24
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:32
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:34
msgid "IN"
msgstr ""
#, elixir-format
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:22
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:30
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:32
msgid "OUT"
msgstr ""
@ -694,3 +686,28 @@ msgstr ""
#: lib/explorer_web/templates/layout/_footer.html.eex:4
msgid "Github"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:45
msgid "Block Confirmations"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:104
msgid "Limit"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:54
msgid "There are no internal transactions for this transaction."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction_log/index.html.eex:77
msgid "There are no logs for this transaction."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:97
msgid "Used"
msgstr ""

@ -11,7 +11,6 @@ msgstr ""
"Language: en\n"
#: lib/explorer_web/templates/block/index.html.eex:18
#: lib/explorer_web/templates/transaction/overview.html.eex:52
msgid "Age"
msgstr "Age"
@ -30,8 +29,6 @@ msgstr "%{year} POA Network Ltd. All rights reserved"
#: lib/explorer_web/templates/block/index.html.eex:20
#: lib/explorer_web/templates/block/overview.html.eex:84
#: lib/explorer_web/templates/transaction/overview.html.eex:176
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:34
msgid "Gas Used"
msgstr "Gas Used"
@ -61,14 +58,12 @@ msgstr "POA Network Explorer"
#: lib/explorer_web/templates/block_transaction/index.html.eex:36
#: lib/explorer_web/templates/chain/_transactions.html.eex:4
#: lib/explorer_web/templates/layout/_topnav.html.eex:18
#: lib/explorer_web/templates/pending_transaction/index.html.eex:24
#: lib/explorer_web/templates/transaction/index.html.eex:24
#: lib/explorer_web/templates/pending_transaction/index.html.eex:46
#: lib/explorer_web/templates/transaction/index.html.eex:46
msgid "Transactions"
msgstr "Transactions"
#: lib/explorer_web/templates/transaction/overview.html.eex:64
#: lib/explorer_web/templates/transaction/overview.html.eex:72
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
#: lib/explorer_web/templates/transaction/overview.html.eex:81
msgid "Value"
msgstr "Value"
@ -82,7 +77,6 @@ msgstr "Difficulty"
#: lib/explorer_web/templates/block/index.html.eex:21
#: lib/explorer_web/templates/block/overview.html.eex:92
#: lib/explorer_web/templates/transaction/overview.html.eex:143
msgid "Gas Limit"
msgstr "Gas Limit"
@ -91,7 +85,7 @@ msgid "Miner"
msgstr "Validator"
#: lib/explorer_web/templates/block/overview.html.eex:59
#: lib/explorer_web/templates/transaction/overview.html.eex:117
#: lib/explorer_web/templates/transaction/overview.html.eex:52
msgid "Nonce"
msgstr "Nonce"
@ -115,11 +109,11 @@ msgstr "Timestamp"
msgid "Total Difficulty"
msgstr "Total Difficulty"
#: lib/explorer_web/templates/transaction/overview.html.eex:33
#: lib/explorer_web/templates/transaction/overview.html.eex:31
msgid "Block Number"
msgstr "Block Height"
#: lib/explorer_web/templates/transaction/overview.html.eex:11
#: lib/explorer_web/templates/transaction/overview.html.eex:8
msgid "Transaction Details"
msgstr "Transaction Details"
@ -129,15 +123,15 @@ msgstr "Cumulative Gas Used"
#: lib/explorer_web/templates/block/index.html.eex:20
#: lib/explorer_web/templates/block/index.html.eex:21
#: lib/explorer_web/templates/transaction/overview.html.eex:92
msgid "Gas"
msgstr "Gas"
#: lib/explorer_web/templates/block/index.html.eex:22
#: lib/explorer_web/templates/transaction/overview.html.eex:151
msgid "Gas Price"
msgstr "Gas Price"
#: lib/explorer_web/templates/transaction/overview.html.eex:184
#: lib/explorer_web/templates/transaction/overview.html.eex:63
msgid "Input"
msgstr "Input"
@ -149,15 +143,12 @@ msgstr "%{confirmations} block confirmations"
msgid "%{count} transactions in this block"
msgstr "%{count} transactions in this block"
#: lib/explorer_web/templates/transaction_log/index.html.eex:29
#: lib/explorer_web/views/address_view.ex:15
msgid "Address"
msgstr "Address"
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:106
#: lib/explorer_web/templates/address_transaction/index.html.eex:117
#: lib/explorer_web/templates/transaction/overview.html.eex:80
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:31
#: lib/explorer_web/views/address_internal_transaction_view.ex:10
#: lib/explorer_web/views/address_transaction_view.ex:10
msgid "From"
@ -174,8 +165,6 @@ msgstr "Success"
#: lib/explorer_web/templates/address_internal_transaction/index.html.eex:94
#: lib/explorer_web/templates/address_transaction/index.html.eex:105
#: lib/explorer_web/templates/transaction/overview.html.eex:92
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:32
#: lib/explorer_web/views/address_internal_transaction_view.ex:9
#: lib/explorer_web/views/address_transaction_view.ex:9
msgid "To"
@ -216,9 +205,12 @@ msgstr "Showing #%{start_block} to #%{end_block}"
msgid "Showing %{count} Transactions"
msgstr "Showing %{count} Transactions"
#: lib/explorer_web/templates/pending_transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/index.html.eex:14
#: lib/explorer_web/templates/transaction/overview.html.eex:58
#: lib/explorer_web/templates/pending_transaction/index.html.eex:16
#: lib/explorer_web/templates/pending_transaction/index.html.eex:27
#: lib/explorer_web/templates/pending_transaction/index.html.eex:35
#: lib/explorer_web/templates/transaction/index.html.eex:16
#: lib/explorer_web/templates/transaction/index.html.eex:35
#: lib/explorer_web/templates/transaction/overview.html.eex:40
#: lib/explorer_web/views/transaction_view.ex:38
#: lib/explorer_web/views/transaction_view.ex:69
msgid "Pending"
@ -233,11 +225,13 @@ msgid "Last Seen"
msgstr ""
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:18
#: lib/explorer_web/templates/transaction_log/index.html.eex:18
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:37
#: lib/explorer_web/templates/transaction_log/index.html.eex:17
#: lib/explorer_web/templates/transaction_log/index.html.eex:25
msgid "Logs"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:25
#: lib/explorer_web/templates/pending_transaction/index.html.eex:47
msgid "Showing %{count} Pending Transactions"
msgstr ""
@ -303,14 +297,13 @@ msgstr ""
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:29
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:45
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:47
#: lib/explorer_web/templates/block_transaction/_transaction.html.eex:33
#: lib/explorer_web/templates/chain/_transactions.html.eex:33
#: lib/explorer_web/templates/pending_transaction/index.html.eex:47
#: lib/explorer_web/templates/transaction/index.html.eex:54
#: lib/explorer_web/templates/transaction/overview.html.eex:64
#: lib/explorer_web/templates/transaction/overview.html.eex:160
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:33
#: lib/explorer_web/templates/pending_transaction/index.html.eex:71
#: lib/explorer_web/templates/transaction/index.html.eex:76
#: lib/explorer_web/templates/transaction/overview.html.eex:81
#: lib/explorer_web/templates/transaction_internal_transaction/_internal_transaction.html.eex:16
#: lib/explorer_web/views/wei_helpers.ex:71
msgid "Ether"
msgstr "POA"
@ -328,7 +321,10 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:20
#: lib/explorer_web/templates/address_transaction/index.html.eex:60
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:11
#: lib/explorer_web/templates/transaction_log/index.html.eex:11
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:29
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:32
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:47
#: lib/explorer_web/templates/transaction_log/index.html.eex:10
msgid "Internal Transactions"
msgstr ""
@ -371,15 +367,19 @@ msgstr ""
msgid "All"
msgstr ""
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:47
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:49
#: lib/explorer_web/templates/block_transaction/_transaction.html.eex:35
#: lib/explorer_web/templates/chain/_transactions.html.eex:35
#: lib/explorer_web/templates/transaction/index.html.eex:55
#: lib/explorer_web/templates/pending_transaction/index.html.eex:72
#: lib/explorer_web/templates/transaction/index.html.eex:77
msgid "Fee"
msgstr ""
#: lib/explorer_web/templates/pending_transaction/index.html.eex:7
#: lib/explorer_web/templates/transaction/index.html.eex:7
#: lib/explorer_web/templates/pending_transaction/index.html.eex:9
#: lib/explorer_web/templates/pending_transaction/index.html.eex:30
#: lib/explorer_web/templates/transaction/index.html.eex:9
#: lib/explorer_web/templates/transaction/index.html.eex:27
#: lib/explorer_web/templates/transaction/index.html.eex:30
msgid "Validated"
msgstr ""
@ -407,8 +407,6 @@ msgstr ""
msgid "Price"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:72
#: lib/explorer_web/templates/transaction/overview.html.eex:168
#: lib/explorer_web/views/currency_helpers.ex:32
msgid "USD"
msgstr ""
@ -421,7 +419,7 @@ msgstr ""
msgid "Dashboard"
msgstr ""
#: lib/explorer_web/templates/transaction/index.html.eex:25
#: lib/explorer_web/templates/transaction/index.html.eex:47
msgid "Showing %{count} Validated Transactions"
msgstr ""
@ -462,8 +460,7 @@ msgstr ""
msgid "View All"
msgstr ""
#: lib/explorer_web/templates/transaction/overview.html.eex:160
#: lib/explorer_web/templates/transaction/overview.html.eex:168
#: lib/explorer_web/templates/transaction/overview.html.eex:57
msgid "TX Fee"
msgstr ""
@ -487,8 +484,8 @@ msgstr ""
#: lib/explorer_web/templates/address_transaction/index.html.eex:146
#: lib/explorer_web/templates/block/index.html.eex:60
#: lib/explorer_web/templates/block_transaction/index.html.eex:51
#: lib/explorer_web/templates/pending_transaction/index.html.eex:54
#: lib/explorer_web/templates/transaction/index.html.eex:62
#: lib/explorer_web/templates/pending_transaction/index.html.eex:79
#: lib/explorer_web/templates/transaction/index.html.eex:84
msgid "Older"
msgstr ""
@ -522,14 +519,12 @@ msgid "Last Updated In Block"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:71
#: lib/explorer_web/templates/transaction_log/index.html.eex:73
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:61
#: lib/explorer_web/templates/transaction_log/index.html.eex:82
msgid "Newer"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:110
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:47
#: lib/explorer_web/views/transaction_view.ex:111
msgid "Contract Creation"
msgstr ""
@ -584,11 +579,6 @@ msgstr ""
msgid "Wallet addresses"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:47
msgid "block confirmations"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/address_transaction/index.html.eex:89
msgid "Connection Lost, click to load newer transactions"
@ -602,6 +592,7 @@ msgstr ""
#, elixir-format
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:4
#: lib/explorer_web/templates/transaction_internal_transaction/_internal_transaction.html.eex:4
msgid "Internal Transaction"
msgstr ""
@ -628,7 +619,8 @@ msgid "There are no transactions for this address."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/pending_transaction/index.html.eex:44
#: lib/explorer_web/templates/pending_transaction/index.html.eex:66
#: lib/explorer_web/templates/transaction/overview.html.eex:16
msgid "Contract Address Pending"
msgstr ""
@ -648,24 +640,24 @@ msgid "at"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:37
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:39
#: lib/explorer_web/templates/block_transaction/_transaction.html.eex:25
#: lib/explorer_web/templates/chain/_transactions.html.eex:25
#: lib/explorer_web/templates/transaction/index.html.eex:47
#: lib/explorer_web/templates/transaction/index.html.eex:69
msgid "Block #%{number}"
msgstr ""
#, elixir-format
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:24
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:32
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:34
msgid "IN"
msgstr ""
#, elixir-format
#:
#: lib/explorer_web/templates/address_internal_transaction/_internal_transaction.html.eex:22
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:30
#: lib/explorer_web/templates/address_transaction/_transaction.html.eex:32
msgid "OUT"
msgstr ""
@ -706,3 +698,28 @@ msgstr ""
#: lib/explorer_web/templates/layout/_footer.html.eex:4
msgid "Github"
msgstr ""
#, elixir-format, fuzzy
#: lib/explorer_web/templates/transaction/overview.html.eex:45
msgid "Block Confirmations"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:104
msgid "Limit"
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction_internal_transaction/index.html.eex:54
msgid "There are no internal transactions for this transaction."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction_log/index.html.eex:77
msgid "There are no logs for this transaction."
msgstr ""
#, elixir-format
#: lib/explorer_web/templates/transaction/overview.html.eex:97
msgid "Used"
msgstr ""

@ -5,7 +5,7 @@ defmodule ExplorerWeb.TransactionPage do
import Wallaby.Query, only: [css: 1, css: 2]
alias Explorer.Chain.{InternalTransaction, Transaction, Hash}
alias Explorer.Chain.{Transaction, Hash}
def block_confirmations() do
css("[data-selector='block-confirmations']")
@ -15,10 +15,6 @@ defmodule ExplorerWeb.TransactionPage do
click(session, css("[data-test='transaction_logs_link']"))
end
def contract_creation_address_hash(%InternalTransaction{created_contract_address_hash: hash}) do
css("[data-test='created_contract_address_hash']", text: Hash.to_string(hash))
end
def detail_hash(%Transaction{hash: transaction_hash}) do
css("[data-test='transaction_detail_hash']", text: Hash.to_string(transaction_hash))
end

@ -135,19 +135,6 @@ defmodule ExplorerWeb.ViewingTransactionsTest do
|> assert_has(TransactionPage.detail_hash(transaction))
end
test "can see a contract creation address in to_address", %{session: session} do
transaction =
:transaction
|> insert(to_address: nil)
|> with_block()
internal_transaction = insert(:internal_transaction_create, transaction: transaction, index: 0)
session
|> TransactionPage.visit_page(transaction.hash)
|> assert_has(TransactionPage.contract_creation_address_hash(internal_transaction))
end
test "can view a transaction's logs", %{session: session, transaction: transaction} do
session
|> TransactionPage.visit_page(transaction)

Loading…
Cancel
Save