|
|
@ -3,12 +3,10 @@ |
|
|
|
<%= link(gettext("View All Transactions →"), to: transaction_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> |
|
|
|
<%= link(gettext("View All Transactions →"), to: transaction_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> |
|
|
|
<h2 class="card-title"><%= gettext "Transactions" %></h2> |
|
|
|
<h2 class="card-title"><%= gettext "Transactions" %></h2> |
|
|
|
<%= for transaction <- @chain.transactions do %> |
|
|
|
<%= for transaction <- @chain.transactions do %> |
|
|
|
<%= cond do %> |
|
|
|
<div class="tile <%= ExplorerWeb.TransactionView.tile_class(transaction) %>"> |
|
|
|
<%= transaction.created_contract_address_hash != nil -> %> |
|
|
|
|
|
|
|
<div class="tile tile-type-contract-creation"> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-md-2 d-flex align-items-center justify-content-center tile-label"> |
|
|
|
<div class="col-md-2 d-flex align-items-center justify-content-center tile-label"> |
|
|
|
<%= gettext("Contract Creation") %> |
|
|
|
<%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-md-8"> |
|
|
|
<div class="col-md-8"> |
|
|
|
<%= link(transaction.hash , |
|
|
|
<%= link(transaction.hash , |
|
|
@ -19,41 +17,7 @@ |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> |
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> |
|
|
|
→ |
|
|
|
→ |
|
|
|
<%= link( |
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", Keyword.merge(ExplorerWeb.TransactionView.display_to_address(transaction), locale: @locale) %> |
|
|
|
transaction.created_contract_address_hash, |
|
|
|
|
|
|
|
class: "tile-label", |
|
|
|
|
|
|
|
"data-address-hash": transaction.created_contract_address_hash, |
|
|
|
|
|
|
|
to: address_path(@conn, :show, @conn.assigns.locale, transaction.created_contract_address_hash), |
|
|
|
|
|
|
|
title: transaction.created_contract_address_hash |
|
|
|
|
|
|
|
) %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 d-flex flex-column justify-content-end text-right"> |
|
|
|
|
|
|
|
<span data-from-now="<%= transaction.block.timestamp %>"></span> |
|
|
|
|
|
|
|
<%= link( |
|
|
|
|
|
|
|
gettext("Block #") <> "#{transaction.block.number}", |
|
|
|
|
|
|
|
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block) |
|
|
|
|
|
|
|
) %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% ExplorerWeb.AddressView.contract?(transaction.from_address) || ExplorerWeb.AddressView.contract?(transaction.to_address) -> %> |
|
|
|
|
|
|
|
<div class="tile tile-type-contract"> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
|
|
|
|
<div class="col-md-2 d-flex align-items-center justify-content-center tile-label"> |
|
|
|
|
|
|
|
<%= gettext("Contract") %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-8"> |
|
|
|
|
|
|
|
<%= link(transaction.hash , |
|
|
|
|
|
|
|
to: transaction_path(ExplorerWeb.Endpoint, :show, @locale, transaction), |
|
|
|
|
|
|
|
"class": "tile-title", |
|
|
|
|
|
|
|
"data-test": "transaction_hash", |
|
|
|
|
|
|
|
"data-transaction-hash": transaction.hash) %> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> |
|
|
|
|
|
|
|
→ |
|
|
|
|
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.to_address %> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA |
|
|
|
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -66,35 +30,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<% true -> %> |
|
|
|
|
|
|
|
<div class="tile tile-type-transaction"> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
|
|
|
|
<div class="col-md-2 d-flex align-items-center justify-content-center tile-label"> |
|
|
|
|
|
|
|
<%= gettext("Transaction") %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-8"> |
|
|
|
|
|
|
|
<%= link(transaction.hash , |
|
|
|
|
|
|
|
to: transaction_path(ExplorerWeb.Endpoint, :show, @locale, transaction), |
|
|
|
|
|
|
|
"class": "tile-title", |
|
|
|
|
|
|
|
"data-test": "transaction_hash", |
|
|
|
|
|
|
|
"data-transaction-hash": transaction.hash) %> |
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> |
|
|
|
|
|
|
|
→ |
|
|
|
|
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.to_address %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-md-2 d-flex flex-column justify-content-end text-right"> |
|
|
|
|
|
|
|
<span data-from-now="<%= transaction.block.timestamp %>"></span> |
|
|
|
|
|
|
|
<%= link( |
|
|
|
|
|
|
|
gettext("Block #") <> "#{transaction.block.number}", |
|
|
|
|
|
|
|
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block) |
|
|
|
|
|
|
|
) %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|