|
|
|
@ -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") %> |
|
|
|
|
<h2 class="card-title"><%= gettext "Transactions" %></h2> |
|
|
|
|
<%= for transaction <- @chain.transactions do %> |
|
|
|
|
<%= cond do %> |
|
|
|
|
<%= transaction.created_contract_address_hash != nil -> %> |
|
|
|
|
<div class="tile tile-type-contract-creation"> |
|
|
|
|
<div class="tile <%= ExplorerWeb.TransactionView.tile_class(transaction) %>"> |
|
|
|
|
<div class="row"> |
|
|
|
|
<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 class="col-md-8"> |
|
|
|
|
<%= link(transaction.hash , |
|
|
|
@ -19,41 +17,7 @@ |
|
|
|
|
<div> |
|
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> |
|
|
|
|
→ |
|
|
|
|
<%= link( |
|
|
|
|
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 %> |
|
|
|
|
<%= render ExplorerWeb.AddressView, "_link.html", Keyword.merge(ExplorerWeb.TransactionView.display_to_address(transaction), locale: @locale) %> |
|
|
|
|
</div> |
|
|
|
|
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA |
|
|
|
|
</div> |
|
|
|
@ -66,35 +30,7 @@ |
|
|
|
|
</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 %> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|