Merge pull request #803 from poanetwork/ln-remove-duplicated-tab-code-from-address-page

Remove duplicated template code from Address page
pull/835/head
Lucas Narciso 6 years ago committed by GitHub
commit 0717e2369b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 113
      apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex
  2. 114
      apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex
  3. 110
      apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex
  4. 95
      apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex
  5. 117
      apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex
  6. 102
      apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex
  7. 110
      apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex
  8. 12
      apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex
  9. 3
      apps/block_scout_web/lib/block_scout_web/views/address_internal_transaction_view.ex
  10. 2
      apps/block_scout_web/lib/block_scout_web/views/address_read_contract_view.ex
  11. 2
      apps/block_scout_web/lib/block_scout_web/views/address_token_transfer_view.ex
  12. 2
      apps/block_scout_web/lib/block_scout_web/views/address_token_view.ex
  13. 3
      apps/block_scout_web/lib/block_scout_web/views/address_transaction_view.ex
  14. 24
      apps/block_scout_web/lib/block_scout_web/views/address_view.ex
  15. 199
      apps/block_scout_web/priv/gettext/default.pot
  16. 199
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  17. 17
      apps/block_scout_web/test/block_scout_web/views/address_contract_view_test.exs
  18. 34
      apps/block_scout_web/test/block_scout_web/views/address_view_test.exs

@ -0,0 +1,113 @@
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Transactions"),
class: "nav-link #{tab_status("transactions", @conn.request_path)}",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Tokens"),
class: "nav-link #{tab_status("tokens", @conn.request_path)}",
to: address_token_path(@conn, :index, @address.hash),
"data-test": "tokens_tab_link"
) %>
</li>
<li class="nav-item"> <%= link(
gettext("Internal Transactions"),
class: "nav-link #{tab_status("internal_transactions", @conn.request_path)}",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<%= if BlockScoutWeb.AddressView.validator?(@validation_count) do %>
<li class="nav-item">
<%= link(
gettext("Blocks Validated"),
class: "nav-link",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
</li>
<% end %>
<%= if contract?(@address) do %>
<li class="nav-item">
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "nav-link #{tab_status("contracts", @conn.request_path)}") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
</li>
<% end %>
<%= if smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link #{tab_status("read_contract", @conn.request_path)}")%>
</li>
<% end %>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-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">
<%= current_tab_name(@conn.request_path) %>
</a>
<div class="dropdown-menu">
<%= link(
gettext("Transactions"),
class: "dropdown-item #{tab_status("transactions", @conn.request_path)}",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Tokens"),
class: "dropdown-item #{tab_status("tokens", @conn.request_path)}",
to: address_token_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item #{tab_status("internal_transactions", @conn.request_path)}",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
<%= if validator?(@validation_count) do %>
<%= link(
gettext("Blocks Validated"),
class: "dropdown-item",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
<% end %>
<%= if contract?(@address) do %>
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "dropdown-item #{tab_status("contracts", @conn.request_path)}") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
<% end %>
<%= if smart_contract_with_read_only_functions?(@address) do %>
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "dropdown-item #{tab_status("read_contract", @conn.request_path)}")%>
<% end %>
</div>
</li>
</ul>

@ -1,119 +1,9 @@
<section class="container"> <section class="container">
<%= render BlockScoutWeb.AddressView, "overview.html", assigns %> <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
<!-- DESKTOP NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Transactions"),
class: "nav-link",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Tokens"),
class: "nav-link",
to: address_token_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<%= if BlockScoutWeb.AddressView.validator?(@validation_count) do %>
<li class="nav-item">
<%= link(
gettext("Blocks Validated"),
class: "nav-link",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
</li>
<% end %>
<li class="nav-item">
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "nav-link active") do %>
<%= gettext("Code") %>
<%= if BlockScoutWeb.AddressView.smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
</li>
<%= if BlockScoutWeb.AddressView.smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link"
)%>
</li>
<% end %>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-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("Code") %>
<%= if BlockScoutWeb.AddressView.smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
</a>
<div class="dropdown-menu">
<%= link(
gettext("Transactions"),
class: "dropdown-item",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Tokens"),
class: "dropdown-item",
to: address_token_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
<%= if BlockScoutWeb.AddressView.validator?(@validation_count) do %>
<%= link(
gettext("Blocks Validated"),
class: "dropdown-item",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
<% end %>
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "dropdown-item active") do %>
<%= gettext("Code") %>
<%= if BlockScoutWeb.AddressView.smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
<%= if BlockScoutWeb.AddressView.smart_contract_with_read_only_functions?(@address) do %>
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "dropdown-item")%>
<% end %>
</div>
</li>
</ul>
</div> </div>
<div class="card-body"> <div class="card-body">
@ -134,7 +24,7 @@
</dl> </dl>
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Optimization enabled" %></dt> <dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Optimization enabled" %></dt>
<dd class="col-sm-8 col-md-10"><%= gettext("%{}", @address.smart_contract.optimization) %></dd> <dd class="col-sm-8 col-md-10"><%= format_optimization_text(@address.smart_contract.optimization) %></dd>
</dl> </dl>
<dl class="row"> <dl class="row">
<dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Compiler version" %></dt> <dt class="col-sm-4 col-md-2 text-muted"><%= gettext "Compiler version" %></dt>

@ -1,118 +1,12 @@
<section class="container"> <section class="container">
<%= render BlockScoutWeb.AddressView, "overview.html", assigns %> <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
<section> <section>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Transactions"),
class: "nav-link",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Tokens"),
class: "nav-link",
to: address_token_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link active",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<%= if validator?(@validation_count) do %>
<li class="nav-item">
<%= link(
gettext("Blocks Validated"),
class: "nav-link",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
</li>
<% end %>
<%= if contract?(@address) do %>
<li class="nav-item">
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "nav-link") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
</li>
<% end %>
<%= if smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link")%>
</li>
<% end %>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-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("Transactions"),
class: "dropdown-item",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Tokens"),
class: "dropdown-item",
to: address_token_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item active",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
<%= if validator?(@validation_count) do %>
<%= link(
gettext("Blocks Validated"),
class: "dropdown-item",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
<% end %>
<%= if contract?(@address) do %>
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "dropdown-item") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
<% end %>
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "dropdown-item")%>
</div>
</li>
</ul>
</div> </div>
<div class="card-body"> <div class="card-body">
<div data-selector="channel-batching-message" class="d-none"> <div data-selector="channel-batching-message" class="d-none">
<div data-selector="reload-button" class="alert alert-info"> <div data-selector="reload-button" class="alert alert-info">

@ -4,100 +4,7 @@
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
<!-- DESKTOP NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Transactions"),
class: "nav-link",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Tokens"),
class: "nav-link",
to: address_token_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<%= if validator?(@validation_count) do %>
<li class="nav-item">
<%= link(
gettext("Blocks Validated"),
class: "nav-link",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
</li>
<% end %>
<li class="nav-item">
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "nav-link") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
</li>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link active"
)%>
</li>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-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("Read Contract") %>
</a>
<div class="dropdown-menu">
<%= link(
gettext("Transactions"),
class: "dropdown-item",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Tokens"),
class: "dropdown-item",
to: address_token_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "dropdown-item") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "dropdown-item active")%>
</div>
</li>
</ul>
</div> </div>
<!-- loaded via AJAX --> <!-- loaded via AJAX -->

@ -4,122 +4,7 @@
<section> <section>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<!-- DESKTOP TAB NAV --> <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Transactions"),
class: "nav-link",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Tokens"),
class: "nav-link active",
to: address_token_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<%= if AddressView.validator?(@validation_count) do %>
<li class="nav-item">
<%= link(
gettext("Blocks Validated"),
class: "nav-link",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
</li>
<% end %>
<%= if AddressView.contract?(@address) do %>
<li class="nav-item">
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "nav-link") do %>
<%= gettext("Code") %>
<%= if AddressView.smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
</li>
<% end %>
<%= if AddressView.smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link")%>
</li>
<% end %>
<%= if AddressView.smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link")%>
</li>
<% end %>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-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("Tokens") %>
</a>
<div class="dropdown-menu">
<%= link(
gettext("Transactions"),
class: "dropdown-item",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Tokens"),
class: "dropdown-item active",
to: address_token_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
<%= if AddressView.validator?(@validation_count) do %>
<%= link(
gettext("Blocks Validated"),
class: "dropdown-item",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
<% end %>
<%= if AddressView.contract?(@address) do %>
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "dropdown-item") do %>
<%= gettext("Code") %>
<%= if AddressView.smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
<% end %>
<%= if AddressView.smart_contract_with_read_only_functions?(@address) do %>
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "dropdown-item")%>
<% end %>
</div>
</li>
</ul>
</div> </div>
<div class="card-body"> <div class="card-body">

@ -4,107 +4,7 @@
<section> <section>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<!-- DESKTOP TAB NAV --> <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Transactions"),
class: "nav-link",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Tokens"),
class: "nav-link active",
to: address_token_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<%= if AddressView.contract?(@address) do %>
<li class="nav-item">
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "nav-link") do %>
<%= gettext("Code") %>
<%= if AddressView.smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
</li>
<% end %>
<%= if AddressView.smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link")%>
</li>
<% end %>
<%= if AddressView.smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link")%>
</li>
<% end %>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-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("Tokens") %>
</a>
<div class="dropdown-menu">
<%= link(
gettext("Transactions"),
class: "dropdown-item",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Tokens"),
class: "dropdown-item active",
to: address_token_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "dropdown-item") do %>
<%= gettext("Code") %>
<%= if AddressView.smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
<%= if AddressView.smart_contract_with_read_only_functions?(@address) do %>
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "dropdown-item"
)%>
<% end %>
</div>
</li>
</ul>
</div> </div>
<div class="card-body"> <div class="card-body">

@ -5,115 +5,7 @@
<section> <section>
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Transactions"),
class: "nav-link active",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Tokens"),
class: "nav-link",
to: address_token_path(@conn, :index, @address.hash),
"data-test": "tokens_tab_link"
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Internal Transactions"),
class: "nav-link",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
</li>
<%= if validator?(@validation_count) do %>
<li class="nav-item">
<%= link(
gettext("Blocks Validated"),
class: "nav-link",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
</li>
<% end %>
<%= if contract?(@address) do %>
<li class="nav-item">
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "nav-link") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
</li>
<% end %>
<%= if smart_contract_with_read_only_functions?(@address) do %>
<li class="nav-item">
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "nav-link"
)%>
</li>
<% end %>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-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 "Transactions" %></a>
<div class="dropdown-menu">
<%= link(
gettext("Transactions"),
class: "dropdown-item active",
to: address_transaction_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Tokens"),
class: "dropdown-item",
to: address_token_path(@conn, :index, @address.hash)
) %>
<%= link(
gettext("Internal Transactions"),
class: "dropdown-item",
"data-test": "internal_transactions_tab_link",
to: address_internal_transaction_path(@conn, :index, @address.hash)
) %>
<%= if validator?(@validation_count) do %>
<%= link(
gettext("Blocks Validated"),
class: "dropdown-item",
"data-test": "validations_tab_link",
to: address_validation_path(@conn, :index, @address.hash)
) %>
<% end %>
<%= if contract?(@address) do %>
<%= link(
to: address_contract_path(@conn, :index, @address.hash),
class: "dropdown-item") do %>
<%= gettext("Code") %>
<%= if smart_contract_verified?(@address) do %>
<i class="far fa-check-circle"></i>
<% end %>
<% end %>
<% end %>
<%= if smart_contract_with_read_only_functions?(@address) do %>
<%= link(
gettext("Read Contract"),
to: address_read_contract_path(@conn, :index, @address.hash),
class: "dropdown-item") %>
<% end %>
</div>
</li>
</ul>
</div> </div>
<div class="card-body"> <div class="card-body">

@ -2,4 +2,16 @@ defmodule BlockScoutWeb.AddressContractView do
use BlockScoutWeb, :view use BlockScoutWeb, :view
def format_smart_contract_abi(abi), do: Poison.encode!(abi, pretty: false) def format_smart_contract_abi(abi), do: Poison.encode!(abi, pretty: false)
@doc """
Returns the correct format for the optimization text.
iex> BlockScoutWeb.AddressContractView.format_optimization_text(true)
"true"
iex> BlockScoutWeb.AddressContractView.format_optimization_text(false)
"false"
"""
def format_optimization_text(true), do: gettext("true")
def format_optimization_text(false), do: gettext("false")
end end

@ -1,9 +1,6 @@
defmodule BlockScoutWeb.AddressInternalTransactionView do defmodule BlockScoutWeb.AddressInternalTransactionView do
use BlockScoutWeb, :view use BlockScoutWeb, :view
import BlockScoutWeb.AddressView,
only: [contract?: 1, smart_contract_verified?: 1, smart_contract_with_read_only_functions?: 1, validator?: 1]
def format_current_filter(filter) do def format_current_filter(filter) do
case filter do case filter do
"to" -> gettext("To") "to" -> gettext("To")

@ -1,8 +1,6 @@
defmodule BlockScoutWeb.AddressReadContractView do defmodule BlockScoutWeb.AddressReadContractView do
use BlockScoutWeb, :view use BlockScoutWeb, :view
import BlockScoutWeb.AddressView, only: [smart_contract_verified?: 1, validator?: 1]
def queryable?(inputs), do: Enum.any?(inputs) def queryable?(inputs), do: Enum.any?(inputs)
def address?(type), do: type == "address" def address?(type), do: type == "address"

@ -1,5 +1,3 @@
defmodule BlockScoutWeb.AddressTokenTransferView do defmodule BlockScoutWeb.AddressTokenTransferView do
use BlockScoutWeb, :view use BlockScoutWeb, :view
alias BlockScoutWeb.AddressView
end end

@ -1,8 +1,6 @@
defmodule BlockScoutWeb.AddressTokenView do defmodule BlockScoutWeb.AddressTokenView do
use BlockScoutWeb, :view use BlockScoutWeb, :view
alias BlockScoutWeb.AddressView
def number_of_transfers(token) do def number_of_transfers(token) do
ngettext("%{count} transfer", "%{count} transfers", token.transfers_count) ngettext("%{count} transfer", "%{count} transfers", token.transfers_count)
end end

@ -1,9 +1,6 @@
defmodule BlockScoutWeb.AddressTransactionView do defmodule BlockScoutWeb.AddressTransactionView do
use BlockScoutWeb, :view use BlockScoutWeb, :view
import BlockScoutWeb.AddressView,
only: [contract?: 1, smart_contract_verified?: 1, smart_contract_with_read_only_functions?: 1, validator?: 1]
def format_current_filter(filter) do def format_current_filter(filter) do
case filter do case filter do
"to" -> gettext("To") "to" -> gettext("To")

@ -6,6 +6,8 @@ defmodule BlockScoutWeb.AddressView do
@dialyzer :no_match @dialyzer :no_match
@tabs ["tokens", "transactions", "internal_transactions", "contracts", "read_contract"]
def address_partial_selector(struct_to_render_from, direction, current_address, truncate \\ false) def address_partial_selector(struct_to_render_from, direction, current_address, truncate \\ false)
def address_partial_selector(%Address{} = address, _, current_address, truncate) do def address_partial_selector(%Address{} = address, _, current_address, truncate) do
@ -195,4 +197,26 @@ defmodule BlockScoutWeb.AddressView do
truncate: truncate truncate: truncate
} }
end end
@doc """
Get the current tab name/title from the request path and possible tab names.
The tabs on mobile are represented by a dropdown list, which has a title. This title is the
currently selected tab name. This function returns that name, properly gettext'ed.
The list of possible tab names for this page is repesented by the attribute @tab.
Raises error if there is no match, so a developer of a new tab must include it in the list.
"""
def current_tab_name(request_path) do
@tabs
|> Enum.filter(&tab_active?(&1, request_path))
|> tab_name()
end
defp tab_name(["tokens"]), do: gettext("Tokens")
defp tab_name(["transactions"]), do: gettext("Transactions")
defp tab_name(["internal_transactions"]), do: gettext("Internal Transactions")
defp tab_name(["contracts"]), do: gettext("Code")
defp tab_name(["read_contract"]), do: gettext("Read Contract")
end end

@ -13,7 +13,7 @@ msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/address_token_view.ex:7 #: lib/block_scout_web/views/address_token_view.ex:5
msgid "%{count} transfer" msgid "%{count} transfer"
msgid_plural "%{count} transfers" msgid_plural "%{count} transfers"
msgstr[0] "" msgstr[0] ""
@ -24,11 +24,6 @@ msgstr[1] ""
msgid "%{count} Transactions" msgid "%{count} Transactions"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:137
msgid "%{}"
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:52 #: lib/block_scout_web/views/transaction_view.ex:52
msgid "(Awaiting internal transactions for status)" msgid "(Awaiting internal transactions for status)"
@ -69,7 +64,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction_log/index.html.eex:15 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15
#: lib/block_scout_web/views/address_view.ex:79 #: lib/block_scout_web/views/address_view.ex:81
msgid "Address" msgid "Address"
msgstr "" msgstr ""
@ -79,10 +74,10 @@ msgid "Addresses"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:134 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:28
#: lib/block_scout_web/templates/address_transaction/index.html.eex:137 #: lib/block_scout_web/templates/address_transaction/index.html.eex:29
#: lib/block_scout_web/views/address_internal_transaction_view.ex:11 #: lib/block_scout_web/views/address_internal_transaction_view.ex:8
#: lib/block_scout_web/views/address_transaction_view.ex:11 #: lib/block_scout_web/views/address_transaction_view.ex:8
msgid "All" msgid "All"
msgstr "" msgstr ""
@ -141,16 +136,9 @@ msgid "Blocks"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_tabs.html.eex:31
#: lib/block_scout_web/templates/address/_tabs.html.eex:88
#: lib/block_scout_web/templates/address/overview.html.eex:31 #: lib/block_scout_web/templates/address/overview.html.eex:31
#: lib/block_scout_web/templates/address_contract/index.html.eex:35
#: lib/block_scout_web/templates/address_contract/index.html.eex:93
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:36
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:91
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:35
#: lib/block_scout_web/templates/address_token/index.html.eex:34
#: lib/block_scout_web/templates/address_token/index.html.eex:97
#: lib/block_scout_web/templates/address_transaction/index.html.eex:37
#: lib/block_scout_web/templates/address_transaction/index.html.eex:91
#: lib/block_scout_web/templates/address_validation/index.html.eex:32 #: lib/block_scout_web/templates/address_validation/index.html.eex:32
#: lib/block_scout_web/templates/address_validation/index.html.eex:81 #: lib/block_scout_web/templates/address_validation/index.html.eex:81
#: lib/block_scout_web/templates/address_validation/index.html.eex:114 #: lib/block_scout_web/templates/address_validation/index.html.eex:114
@ -177,23 +165,13 @@ msgid "Close"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:46 #: lib/block_scout_web/templates/address/_tabs.html.eex:44
#: lib/block_scout_web/templates/address_contract/index.html.eex:68 #: lib/block_scout_web/templates/address/_tabs.html.eex:98
#: lib/block_scout_web/templates/address_contract/index.html.eex:102
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:48
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:101
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:46
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:88
#: lib/block_scout_web/templates/address_token/index.html.eex:46
#: lib/block_scout_web/templates/address_token/index.html.eex:107
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:39
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:92
#: lib/block_scout_web/templates/address_transaction/index.html.eex:49
#: lib/block_scout_web/templates/address_transaction/index.html.eex:101
#: lib/block_scout_web/templates/address_validation/index.html.eex:43 #: lib/block_scout_web/templates/address_validation/index.html.eex:43
#: lib/block_scout_web/templates/address_validation/index.html.eex:90 #: lib/block_scout_web/templates/address_validation/index.html.eex:90
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
#: lib/block_scout_web/views/address_view.ex:220
msgid "Code" msgid "Code"
msgstr "" msgstr ""
@ -203,7 +181,7 @@ msgid "Compiler"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:140 #: lib/block_scout_web/templates/address_contract/index.html.eex:30
msgid "Compiler version" msgid "Compiler version"
msgstr "" msgstr ""
@ -213,12 +191,12 @@ msgid "Connection Lost, click to load newer blocks"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:124 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:18
msgid "Connection Lost, click to load newer internal transactions" msgid "Connection Lost, click to load newer internal transactions"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_transaction/index.html.eex:127 #: lib/block_scout_web/templates/address_transaction/index.html.eex:19
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:53 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:53
#: lib/block_scout_web/templates/transaction/index.html.eex:53 #: lib/block_scout_web/templates/transaction/index.html.eex:53
msgid "Connection Lost, click to load newer transactions" msgid "Connection Lost, click to load newer transactions"
@ -230,20 +208,20 @@ msgid "Connection Lost, click to load newer validations"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:163 #: lib/block_scout_web/templates/address_contract/index.html.eex:53
msgid "Contract ABI" msgid "Contract ABI"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:12 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:12
#: lib/block_scout_web/views/address_view.ex:77 #: lib/block_scout_web/views/address_view.ex:79
msgid "Contract Address" msgid "Contract Address"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:15 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:15
#: lib/block_scout_web/views/address_view.ex:21 #: lib/block_scout_web/views/address_view.ex:23
#: lib/block_scout_web/views/address_view.ex:55 #: lib/block_scout_web/views/address_view.ex:57
msgid "Contract Address Pending" msgid "Contract Address Pending"
msgstr "" msgstr ""
@ -263,17 +241,17 @@ msgid "Contract Name"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:180 #: lib/block_scout_web/templates/address_contract/index.html.eex:70
msgid "Contract creation code" msgid "Contract creation code"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:132 #: lib/block_scout_web/templates/address_contract/index.html.eex:22
msgid "Contract name:" msgid "Contract name:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:147 #: lib/block_scout_web/templates/address_contract/index.html.eex:37
msgid "Contract source code" msgid "Contract source code"
msgstr "" msgstr ""
@ -286,9 +264,9 @@ msgid "Copy Address"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:149 #: lib/block_scout_web/templates/address_contract/index.html.eex:39
#: lib/block_scout_web/templates/address_contract/index.html.eex:165 #: lib/block_scout_web/templates/address_contract/index.html.eex:55
#: lib/block_scout_web/templates/address_contract/index.html.eex:182 #: lib/block_scout_web/templates/address_contract/index.html.eex:72
msgid "Copy Code" msgid "Copy Code"
msgstr "" msgstr ""
@ -389,10 +367,10 @@ msgid "Fetching tokens..."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:151 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:45
#: lib/block_scout_web/templates/address_transaction/index.html.eex:154 #: lib/block_scout_web/templates/address_transaction/index.html.eex:46
#: lib/block_scout_web/views/address_internal_transaction_view.ex:10 #: lib/block_scout_web/views/address_internal_transaction_view.ex:7
#: lib/block_scout_web/views/address_transaction_view.ex:10 #: lib/block_scout_web/views/address_transaction_view.ex:7
msgid "From" msgid "From"
msgstr "" msgstr ""
@ -451,25 +429,15 @@ msgid "Internal Transaction"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:26 #: lib/block_scout_web/templates/address/_tabs.html.eex:21
#: lib/block_scout_web/templates/address_contract/index.html.eex:86 #: lib/block_scout_web/templates/address/_tabs.html.eex:81
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:27 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:57
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:70
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:84
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:163
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:26
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:80
#: lib/block_scout_web/templates/address_token/index.html.eex:25
#: lib/block_scout_web/templates/address_token/index.html.eex:90
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:27
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:84
#: lib/block_scout_web/templates/address_transaction/index.html.eex:28
#: lib/block_scout_web/templates/address_transaction/index.html.eex:84
#: lib/block_scout_web/templates/address_validation/index.html.eex:24 #: lib/block_scout_web/templates/address_validation/index.html.eex:24
#: lib/block_scout_web/templates/address_validation/index.html.eex:75 #: lib/block_scout_web/templates/address_validation/index.html.eex:75
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:14 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:14
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:43 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:43
#: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10
#: lib/block_scout_web/views/address_view.ex:219
#: lib/block_scout_web/views/transaction_view.ex:170 #: lib/block_scout_web/views/transaction_view.ex:170
msgid "Internal Transactions" msgid "Internal Transactions"
msgstr "" msgstr ""
@ -503,7 +471,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:17 #: lib/block_scout_web/templates/chain/show.html.eex:17
#: lib/block_scout_web/templates/layout/app.html.eex:34 #: lib/block_scout_web/templates/layout/app.html.eex:34
#: lib/block_scout_web/views/address_view.ex:99 #: lib/block_scout_web/views/address_view.ex:101
msgid "Market Cap" msgid "Market Cap"
msgstr "" msgstr ""
@ -530,12 +498,12 @@ msgid "Module"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:119 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:13
msgid "More internal transactions have come in" msgid "More internal transactions have come in"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_transaction/index.html.eex:122 #: lib/block_scout_web/templates/address_transaction/index.html.eex:14
#: lib/block_scout_web/templates/chain/show.html.eex:69 #: lib/block_scout_web/templates/chain/show.html.eex:69
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:48 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:48
#: lib/block_scout_web/templates/transaction/index.html.eex:48 #: lib/block_scout_web/templates/transaction/index.html.eex:48
@ -571,8 +539,8 @@ msgid "Newer"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_token/index.html.eex:140 #: lib/block_scout_web/templates/address_token/index.html.eex:25
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:134 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:34
msgid "Next" msgid "Next"
msgstr "" msgstr ""
@ -600,8 +568,8 @@ msgid "OUT"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:178 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:72
#: lib/block_scout_web/templates/address_transaction/index.html.eex:181 #: lib/block_scout_web/templates/address_transaction/index.html.eex:73
#: lib/block_scout_web/templates/address_validation/index.html.eex:123 #: lib/block_scout_web/templates/address_validation/index.html.eex:123
#: lib/block_scout_web/templates/block/index.html.eex:20 #: lib/block_scout_web/templates/block/index.html.eex:20
#: lib/block_scout_web/templates/block_transaction/index.html.eex:50 #: lib/block_scout_web/templates/block_transaction/index.html.eex:50
@ -613,7 +581,7 @@ msgid "Older"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:136 #: lib/block_scout_web/templates/address_contract/index.html.eex:26
msgid "Optimization enabled" msgid "Optimization enabled"
msgstr "" msgstr ""
@ -686,24 +654,12 @@ msgid "Query"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:56 #: lib/block_scout_web/templates/address/_tabs.html.eex:56
#: lib/block_scout_web/templates/address_contract/index.html.eex:110 #: lib/block_scout_web/templates/address/_tabs.html.eex:107
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:59
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:109
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:55
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:66
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:95
#: lib/block_scout_web/templates/address_token/index.html.eex:57
#: lib/block_scout_web/templates/address_token/index.html.eex:65
#: lib/block_scout_web/templates/address_token/index.html.eex:116
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:51
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:59
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:100
#: lib/block_scout_web/templates/address_transaction/index.html.eex:60
#: lib/block_scout_web/templates/address_transaction/index.html.eex:110
#: lib/block_scout_web/templates/address_validation/index.html.eex:53 #: lib/block_scout_web/templates/address_validation/index.html.eex:53
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:33 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:33
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:75 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:75
#: lib/block_scout_web/views/address_view.ex:221
#: lib/block_scout_web/views/tokens/overview_view.ex:35 #: lib/block_scout_web/views/tokens/overview_view.ex:35
msgid "Read Contract" msgid "Read Contract"
msgstr "" msgstr ""
@ -790,7 +746,7 @@ msgid "There are no holders for this Token."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:172 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:66
msgid "There are no internal transactions for this address." msgid "There are no internal transactions for this address."
msgstr "" msgstr ""
@ -806,7 +762,7 @@ msgid "There are no logs for this transaction."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:128 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:28
msgid "There are no token transfers for this address." msgid "There are no token transfers for this address."
msgstr "" msgstr ""
@ -816,7 +772,7 @@ msgid "There are no token transfers for this transaction."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_token/index.html.eex:133 #: lib/block_scout_web/templates/address_token/index.html.eex:18
msgid "There are no tokens for this address." msgid "There are no tokens for this address."
msgstr "" msgstr ""
@ -826,7 +782,7 @@ msgid "There are no tokens."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_transaction/index.html.eex:175 #: lib/block_scout_web/templates/address_transaction/index.html.eex:67
#: lib/block_scout_web/templates/block_transaction/index.html.eex:44 #: lib/block_scout_web/templates/block_transaction/index.html.eex:44
msgid "There are no transactions for this address." msgid "There are no transactions for this address."
msgstr "" msgstr ""
@ -847,10 +803,10 @@ msgid "This transaction is pending confirmation."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:140 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:34
#: lib/block_scout_web/templates/address_transaction/index.html.eex:143 #: lib/block_scout_web/templates/address_transaction/index.html.eex:35
#: lib/block_scout_web/views/address_internal_transaction_view.ex:9 #: lib/block_scout_web/views/address_internal_transaction_view.ex:6
#: lib/block_scout_web/views/address_transaction_view.ex:9 #: lib/block_scout_web/views/address_transaction_view.ex:6
msgid "To" msgid "To"
msgstr "" msgstr ""
@ -897,25 +853,14 @@ msgid "Token Transfers"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:19 #: lib/block_scout_web/templates/address/_tabs.html.eex:13
#: lib/block_scout_web/templates/address_contract/index.html.eex:81 #: lib/block_scout_web/templates/address/_tabs.html.eex:76
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:20 #: lib/block_scout_web/templates/address_token/index.html.eex:11
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:79 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:12
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:19
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:75
#: lib/block_scout_web/templates/address_token/index.html.eex:18
#: lib/block_scout_web/templates/address_token/index.html.eex:76
#: lib/block_scout_web/templates/address_token/index.html.eex:85
#: lib/block_scout_web/templates/address_token/index.html.eex:126
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:70
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:79
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:112
#: lib/block_scout_web/templates/address_transaction/index.html.eex:20
#: lib/block_scout_web/templates/address_transaction/index.html.eex:79
#: lib/block_scout_web/templates/address_validation/index.html.eex:18 #: lib/block_scout_web/templates/address_validation/index.html.eex:18
#: lib/block_scout_web/templates/address_validation/index.html.eex:62 #: lib/block_scout_web/templates/address_validation/index.html.eex:62
#: lib/block_scout_web/templates/address_validation/index.html.eex:70 #: lib/block_scout_web/templates/address_validation/index.html.eex:70
#: lib/block_scout_web/views/address_view.ex:217
msgid "Tokens" msgid "Tokens"
msgstr "" msgstr ""
@ -950,22 +895,11 @@ msgid "Transaction Details"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_tabs.html.eex:5
#: lib/block_scout_web/templates/address/_tabs.html.eex:71
#: lib/block_scout_web/templates/address/index.html.eex:28 #: lib/block_scout_web/templates/address/index.html.eex:28
#: lib/block_scout_web/templates/address/overview.html.eex:27 #: lib/block_scout_web/templates/address/overview.html.eex:27
#: lib/block_scout_web/templates/address_contract/index.html.eex:12 #: lib/block_scout_web/templates/address_transaction/index.html.eex:59
#: lib/block_scout_web/templates/address_contract/index.html.eex:76
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:13
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:74
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:12
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:70
#: lib/block_scout_web/templates/address_token/index.html.eex:11
#: lib/block_scout_web/templates/address_token/index.html.eex:80
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:11
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:74
#: lib/block_scout_web/templates/address_transaction/index.html.eex:13
#: lib/block_scout_web/templates/address_transaction/index.html.eex:71
#: lib/block_scout_web/templates/address_transaction/index.html.eex:74
#: lib/block_scout_web/templates/address_transaction/index.html.eex:167
#: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/templates/address_validation/index.html.eex:11
#: lib/block_scout_web/templates/address_validation/index.html.eex:65 #: lib/block_scout_web/templates/address_validation/index.html.eex:65
#: lib/block_scout_web/templates/block_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block_transaction/index.html.eex:13
@ -976,6 +910,7 @@ msgstr ""
#: lib/block_scout_web/templates/layout/_topnav.html.eex:24 #: lib/block_scout_web/templates/layout/_topnav.html.eex:24
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:56 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:56
#: lib/block_scout_web/templates/transaction/index.html.eex:56 #: lib/block_scout_web/templates/transaction/index.html.eex:56
#: lib/block_scout_web/views/address_view.ex:218
msgid "Transactions" msgid "Transactions"
msgstr "" msgstr ""
@ -1024,7 +959,7 @@ msgid "Value"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:122 #: lib/block_scout_web/templates/address_contract/index.html.eex:12
msgid "Verify & Publish" msgid "Verify & Publish"
msgstr "" msgstr ""
@ -1094,7 +1029,7 @@ msgid "decimals"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:105 #: lib/block_scout_web/templates/address_read_contract/index.html.eex:12
#: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:19 #: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:19
msgid "loading..." msgid "loading..."
msgstr "" msgstr ""
@ -1121,3 +1056,13 @@ msgstr ""
#: lib/block_scout_web/templates/address/index.html.eex:8 #: lib/block_scout_web/templates/address/index.html.eex:8
msgid "total addresses with a balance" msgid "total addresses with a balance"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/views/address_contract_view.ex:16
msgid "false"
msgstr ""
#, elixir-format
#: lib/block_scout_web/views/address_contract_view.ex:15
msgid "true"
msgstr ""

@ -13,7 +13,7 @@ msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/address_token_view.ex:7 #: lib/block_scout_web/views/address_token_view.ex:5
msgid "%{count} transfer" msgid "%{count} transfer"
msgid_plural "%{count} transfers" msgid_plural "%{count} transfers"
msgstr[0] "" msgstr[0] ""
@ -24,11 +24,6 @@ msgstr[1] ""
msgid "%{count} Transactions" msgid "%{count} Transactions"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:137
msgid "%{}"
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/views/transaction_view.ex:52 #: lib/block_scout_web/views/transaction_view.ex:52
msgid "(Awaiting internal transactions for status)" msgid "(Awaiting internal transactions for status)"
@ -69,7 +64,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction_log/index.html.eex:15 #: lib/block_scout_web/templates/transaction_log/index.html.eex:15
#: lib/block_scout_web/views/address_view.ex:79 #: lib/block_scout_web/views/address_view.ex:81
msgid "Address" msgid "Address"
msgstr "" msgstr ""
@ -79,10 +74,10 @@ msgid "Addresses"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:134 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:28
#: lib/block_scout_web/templates/address_transaction/index.html.eex:137 #: lib/block_scout_web/templates/address_transaction/index.html.eex:29
#: lib/block_scout_web/views/address_internal_transaction_view.ex:11 #: lib/block_scout_web/views/address_internal_transaction_view.ex:8
#: lib/block_scout_web/views/address_transaction_view.ex:11 #: lib/block_scout_web/views/address_transaction_view.ex:8
msgid "All" msgid "All"
msgstr "" msgstr ""
@ -141,16 +136,9 @@ msgid "Blocks"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_tabs.html.eex:31
#: lib/block_scout_web/templates/address/_tabs.html.eex:88
#: lib/block_scout_web/templates/address/overview.html.eex:31 #: lib/block_scout_web/templates/address/overview.html.eex:31
#: lib/block_scout_web/templates/address_contract/index.html.eex:35
#: lib/block_scout_web/templates/address_contract/index.html.eex:93
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:36
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:91
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:35
#: lib/block_scout_web/templates/address_token/index.html.eex:34
#: lib/block_scout_web/templates/address_token/index.html.eex:97
#: lib/block_scout_web/templates/address_transaction/index.html.eex:37
#: lib/block_scout_web/templates/address_transaction/index.html.eex:91
#: lib/block_scout_web/templates/address_validation/index.html.eex:32 #: lib/block_scout_web/templates/address_validation/index.html.eex:32
#: lib/block_scout_web/templates/address_validation/index.html.eex:81 #: lib/block_scout_web/templates/address_validation/index.html.eex:81
#: lib/block_scout_web/templates/address_validation/index.html.eex:114 #: lib/block_scout_web/templates/address_validation/index.html.eex:114
@ -177,23 +165,13 @@ msgid "Close"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:46 #: lib/block_scout_web/templates/address/_tabs.html.eex:44
#: lib/block_scout_web/templates/address_contract/index.html.eex:68 #: lib/block_scout_web/templates/address/_tabs.html.eex:98
#: lib/block_scout_web/templates/address_contract/index.html.eex:102
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:48
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:101
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:46
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:88
#: lib/block_scout_web/templates/address_token/index.html.eex:46
#: lib/block_scout_web/templates/address_token/index.html.eex:107
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:39
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:92
#: lib/block_scout_web/templates/address_transaction/index.html.eex:49
#: lib/block_scout_web/templates/address_transaction/index.html.eex:101
#: lib/block_scout_web/templates/address_validation/index.html.eex:43 #: lib/block_scout_web/templates/address_validation/index.html.eex:43
#: lib/block_scout_web/templates/address_validation/index.html.eex:90 #: lib/block_scout_web/templates/address_validation/index.html.eex:90
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
#: lib/block_scout_web/views/address_view.ex:220
msgid "Code" msgid "Code"
msgstr "" msgstr ""
@ -203,7 +181,7 @@ msgid "Compiler"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:140 #: lib/block_scout_web/templates/address_contract/index.html.eex:30
msgid "Compiler version" msgid "Compiler version"
msgstr "" msgstr ""
@ -213,12 +191,12 @@ msgid "Connection Lost, click to load newer blocks"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:124 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:18
msgid "Connection Lost, click to load newer internal transactions" msgid "Connection Lost, click to load newer internal transactions"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_transaction/index.html.eex:127 #: lib/block_scout_web/templates/address_transaction/index.html.eex:19
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:53 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:53
#: lib/block_scout_web/templates/transaction/index.html.eex:53 #: lib/block_scout_web/templates/transaction/index.html.eex:53
msgid "Connection Lost, click to load newer transactions" msgid "Connection Lost, click to load newer transactions"
@ -230,20 +208,20 @@ msgid "Connection Lost, click to load newer validations"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:163 #: lib/block_scout_web/templates/address_contract/index.html.eex:53
msgid "Contract ABI" msgid "Contract ABI"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract_verification/new.html.eex:12 #: lib/block_scout_web/templates/address_contract_verification/new.html.eex:12
#: lib/block_scout_web/views/address_view.ex:77 #: lib/block_scout_web/views/address_view.ex:79
msgid "Contract Address" msgid "Contract Address"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:15 #: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:15
#: lib/block_scout_web/views/address_view.ex:21 #: lib/block_scout_web/views/address_view.ex:23
#: lib/block_scout_web/views/address_view.ex:55 #: lib/block_scout_web/views/address_view.ex:57
msgid "Contract Address Pending" msgid "Contract Address Pending"
msgstr "" msgstr ""
@ -263,17 +241,17 @@ msgid "Contract Name"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:180 #: lib/block_scout_web/templates/address_contract/index.html.eex:70
msgid "Contract creation code" msgid "Contract creation code"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:132 #: lib/block_scout_web/templates/address_contract/index.html.eex:22
msgid "Contract name:" msgid "Contract name:"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:147 #: lib/block_scout_web/templates/address_contract/index.html.eex:37
msgid "Contract source code" msgid "Contract source code"
msgstr "" msgstr ""
@ -286,9 +264,9 @@ msgid "Copy Address"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:149 #: lib/block_scout_web/templates/address_contract/index.html.eex:39
#: lib/block_scout_web/templates/address_contract/index.html.eex:165 #: lib/block_scout_web/templates/address_contract/index.html.eex:55
#: lib/block_scout_web/templates/address_contract/index.html.eex:182 #: lib/block_scout_web/templates/address_contract/index.html.eex:72
msgid "Copy Code" msgid "Copy Code"
msgstr "" msgstr ""
@ -389,10 +367,10 @@ msgid "Fetching tokens..."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:151 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:45
#: lib/block_scout_web/templates/address_transaction/index.html.eex:154 #: lib/block_scout_web/templates/address_transaction/index.html.eex:46
#: lib/block_scout_web/views/address_internal_transaction_view.ex:10 #: lib/block_scout_web/views/address_internal_transaction_view.ex:7
#: lib/block_scout_web/views/address_transaction_view.ex:10 #: lib/block_scout_web/views/address_transaction_view.ex:7
msgid "From" msgid "From"
msgstr "" msgstr ""
@ -451,25 +429,15 @@ msgid "Internal Transaction"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:26 #: lib/block_scout_web/templates/address/_tabs.html.eex:21
#: lib/block_scout_web/templates/address_contract/index.html.eex:86 #: lib/block_scout_web/templates/address/_tabs.html.eex:81
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:27 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:57
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:70
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:84
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:163
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:26
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:80
#: lib/block_scout_web/templates/address_token/index.html.eex:25
#: lib/block_scout_web/templates/address_token/index.html.eex:90
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:27
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:84
#: lib/block_scout_web/templates/address_transaction/index.html.eex:28
#: lib/block_scout_web/templates/address_transaction/index.html.eex:84
#: lib/block_scout_web/templates/address_validation/index.html.eex:24 #: lib/block_scout_web/templates/address_validation/index.html.eex:24
#: lib/block_scout_web/templates/address_validation/index.html.eex:75 #: lib/block_scout_web/templates/address_validation/index.html.eex:75
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:14 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:14
#: lib/block_scout_web/templates/transaction/_tabs.html.eex:43 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:43
#: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:10
#: lib/block_scout_web/views/address_view.ex:219
#: lib/block_scout_web/views/transaction_view.ex:170 #: lib/block_scout_web/views/transaction_view.ex:170
msgid "Internal Transactions" msgid "Internal Transactions"
msgstr "" msgstr ""
@ -503,7 +471,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/chain/show.html.eex:17 #: lib/block_scout_web/templates/chain/show.html.eex:17
#: lib/block_scout_web/templates/layout/app.html.eex:34 #: lib/block_scout_web/templates/layout/app.html.eex:34
#: lib/block_scout_web/views/address_view.ex:99 #: lib/block_scout_web/views/address_view.ex:101
msgid "Market Cap" msgid "Market Cap"
msgstr "" msgstr ""
@ -530,12 +498,12 @@ msgid "Module"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:119 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:13
msgid "More internal transactions have come in" msgid "More internal transactions have come in"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_transaction/index.html.eex:122 #: lib/block_scout_web/templates/address_transaction/index.html.eex:14
#: lib/block_scout_web/templates/chain/show.html.eex:69 #: lib/block_scout_web/templates/chain/show.html.eex:69
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:48 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:48
#: lib/block_scout_web/templates/transaction/index.html.eex:48 #: lib/block_scout_web/templates/transaction/index.html.eex:48
@ -571,8 +539,8 @@ msgid "Newer"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_token/index.html.eex:140 #: lib/block_scout_web/templates/address_token/index.html.eex:25
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:134 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:34
msgid "Next" msgid "Next"
msgstr "" msgstr ""
@ -600,8 +568,8 @@ msgid "OUT"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:178 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:72
#: lib/block_scout_web/templates/address_transaction/index.html.eex:181 #: lib/block_scout_web/templates/address_transaction/index.html.eex:73
#: lib/block_scout_web/templates/address_validation/index.html.eex:123 #: lib/block_scout_web/templates/address_validation/index.html.eex:123
#: lib/block_scout_web/templates/block/index.html.eex:20 #: lib/block_scout_web/templates/block/index.html.eex:20
#: lib/block_scout_web/templates/block_transaction/index.html.eex:50 #: lib/block_scout_web/templates/block_transaction/index.html.eex:50
@ -613,7 +581,7 @@ msgid "Older"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:136 #: lib/block_scout_web/templates/address_contract/index.html.eex:26
msgid "Optimization enabled" msgid "Optimization enabled"
msgstr "" msgstr ""
@ -686,24 +654,12 @@ msgid "Query"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:56 #: lib/block_scout_web/templates/address/_tabs.html.eex:56
#: lib/block_scout_web/templates/address_contract/index.html.eex:110 #: lib/block_scout_web/templates/address/_tabs.html.eex:107
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:59
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:109
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:55
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:66
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:95
#: lib/block_scout_web/templates/address_token/index.html.eex:57
#: lib/block_scout_web/templates/address_token/index.html.eex:65
#: lib/block_scout_web/templates/address_token/index.html.eex:116
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:51
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:59
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:100
#: lib/block_scout_web/templates/address_transaction/index.html.eex:60
#: lib/block_scout_web/templates/address_transaction/index.html.eex:110
#: lib/block_scout_web/templates/address_validation/index.html.eex:53 #: lib/block_scout_web/templates/address_validation/index.html.eex:53
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:33 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:33
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:75 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:75
#: lib/block_scout_web/views/address_view.ex:221
#: lib/block_scout_web/views/tokens/overview_view.ex:35 #: lib/block_scout_web/views/tokens/overview_view.ex:35
msgid "Read Contract" msgid "Read Contract"
msgstr "" msgstr ""
@ -790,7 +746,7 @@ msgid "There are no holders for this Token."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:172 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:66
msgid "There are no internal transactions for this address." msgid "There are no internal transactions for this address."
msgstr "" msgstr ""
@ -806,7 +762,7 @@ msgid "There are no logs for this transaction."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:128 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:28
msgid "There are no token transfers for this address." msgid "There are no token transfers for this address."
msgstr "" msgstr ""
@ -816,7 +772,7 @@ msgid "There are no token transfers for this transaction."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_token/index.html.eex:133 #: lib/block_scout_web/templates/address_token/index.html.eex:18
msgid "There are no tokens for this address." msgid "There are no tokens for this address."
msgstr "" msgstr ""
@ -826,7 +782,7 @@ msgid "There are no tokens."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_transaction/index.html.eex:175 #: lib/block_scout_web/templates/address_transaction/index.html.eex:67
#: lib/block_scout_web/templates/block_transaction/index.html.eex:44 #: lib/block_scout_web/templates/block_transaction/index.html.eex:44
msgid "There are no transactions for this address." msgid "There are no transactions for this address."
msgstr "" msgstr ""
@ -847,10 +803,10 @@ msgid "This transaction is pending confirmation."
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:140 #: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:34
#: lib/block_scout_web/templates/address_transaction/index.html.eex:143 #: lib/block_scout_web/templates/address_transaction/index.html.eex:35
#: lib/block_scout_web/views/address_internal_transaction_view.ex:9 #: lib/block_scout_web/views/address_internal_transaction_view.ex:6
#: lib/block_scout_web/views/address_transaction_view.ex:9 #: lib/block_scout_web/views/address_transaction_view.ex:6
msgid "To" msgid "To"
msgstr "" msgstr ""
@ -897,25 +853,14 @@ msgid "Token Transfers"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:19 #: lib/block_scout_web/templates/address/_tabs.html.eex:13
#: lib/block_scout_web/templates/address_contract/index.html.eex:81 #: lib/block_scout_web/templates/address/_tabs.html.eex:76
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:20 #: lib/block_scout_web/templates/address_token/index.html.eex:11
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:79 #: lib/block_scout_web/templates/address_token_transfer/index.html.eex:12
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:19
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:75
#: lib/block_scout_web/templates/address_token/index.html.eex:18
#: lib/block_scout_web/templates/address_token/index.html.eex:76
#: lib/block_scout_web/templates/address_token/index.html.eex:85
#: lib/block_scout_web/templates/address_token/index.html.eex:126
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:70
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:79
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:112
#: lib/block_scout_web/templates/address_transaction/index.html.eex:20
#: lib/block_scout_web/templates/address_transaction/index.html.eex:79
#: lib/block_scout_web/templates/address_validation/index.html.eex:18 #: lib/block_scout_web/templates/address_validation/index.html.eex:18
#: lib/block_scout_web/templates/address_validation/index.html.eex:62 #: lib/block_scout_web/templates/address_validation/index.html.eex:62
#: lib/block_scout_web/templates/address_validation/index.html.eex:70 #: lib/block_scout_web/templates/address_validation/index.html.eex:70
#: lib/block_scout_web/views/address_view.ex:217
msgid "Tokens" msgid "Tokens"
msgstr "" msgstr ""
@ -950,22 +895,11 @@ msgid "Transaction Details"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address/_tabs.html.eex:5
#: lib/block_scout_web/templates/address/_tabs.html.eex:71
#: lib/block_scout_web/templates/address/index.html.eex:28 #: lib/block_scout_web/templates/address/index.html.eex:28
#: lib/block_scout_web/templates/address/overview.html.eex:27 #: lib/block_scout_web/templates/address/overview.html.eex:27
#: lib/block_scout_web/templates/address_contract/index.html.eex:12 #: lib/block_scout_web/templates/address_transaction/index.html.eex:59
#: lib/block_scout_web/templates/address_contract/index.html.eex:76
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:13
#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:74
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:12
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:70
#: lib/block_scout_web/templates/address_token/index.html.eex:11
#: lib/block_scout_web/templates/address_token/index.html.eex:80
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:11
#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:74
#: lib/block_scout_web/templates/address_transaction/index.html.eex:13
#: lib/block_scout_web/templates/address_transaction/index.html.eex:71
#: lib/block_scout_web/templates/address_transaction/index.html.eex:74
#: lib/block_scout_web/templates/address_transaction/index.html.eex:167
#: lib/block_scout_web/templates/address_validation/index.html.eex:11 #: lib/block_scout_web/templates/address_validation/index.html.eex:11
#: lib/block_scout_web/templates/address_validation/index.html.eex:65 #: lib/block_scout_web/templates/address_validation/index.html.eex:65
#: lib/block_scout_web/templates/block_transaction/index.html.eex:13 #: lib/block_scout_web/templates/block_transaction/index.html.eex:13
@ -976,6 +910,7 @@ msgstr ""
#: lib/block_scout_web/templates/layout/_topnav.html.eex:24 #: lib/block_scout_web/templates/layout/_topnav.html.eex:24
#: lib/block_scout_web/templates/pending_transaction/index.html.eex:56 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:56
#: lib/block_scout_web/templates/transaction/index.html.eex:56 #: lib/block_scout_web/templates/transaction/index.html.eex:56
#: lib/block_scout_web/views/address_view.ex:218
msgid "Transactions" msgid "Transactions"
msgstr "" msgstr ""
@ -1024,7 +959,7 @@ msgid "Value"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_contract/index.html.eex:122 #: lib/block_scout_web/templates/address_contract/index.html.eex:12
msgid "Verify & Publish" msgid "Verify & Publish"
msgstr "" msgstr ""
@ -1094,7 +1029,7 @@ msgid "decimals"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:105 #: lib/block_scout_web/templates/address_read_contract/index.html.eex:12
#: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:19 #: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:19
msgid "loading..." msgid "loading..."
msgstr "" msgstr ""
@ -1121,3 +1056,13 @@ msgstr ""
#: lib/block_scout_web/templates/address/index.html.eex:8 #: lib/block_scout_web/templates/address/index.html.eex:8
msgid "total addresses with a balance" msgid "total addresses with a balance"
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/views/address_contract_view.ex:16
msgid "false"
msgstr ""
#, elixir-format
#: lib/block_scout_web/views/address_contract_view.ex:15
msgid "true"
msgstr ""

@ -0,0 +1,17 @@
defmodule BlockScoutWeb.AddressContractViewTest do
use BlockScoutWeb.ConnCase, async: true
alias BlockScoutWeb.AddressContractView
doctest BlockScoutWeb.AddressContractView
describe "format_optimization_text/1" do
test "returns \"true\" for the boolean true" do
assert AddressContractView.format_optimization_text(true) == "true"
end
test "returns \"false\" for the boolean false" do
assert AddressContractView.format_optimization_text(false) == "false"
end
end
end

@ -2,7 +2,7 @@ defmodule BlockScoutWeb.AddressViewTest do
use BlockScoutWeb.ConnCase, async: true use BlockScoutWeb.ConnCase, async: true
alias Explorer.Chain.{Address, Data, Hash, Transaction} alias Explorer.Chain.{Address, Data, Hash, Transaction}
alias BlockScoutWeb.AddressView alias BlockScoutWeb.{AddressView, Endpoint}
describe "address_partial_selector/4" do describe "address_partial_selector/4" do
test "for a pending transaction contract creation to address" do test "for a pending transaction contract creation to address" do
@ -289,4 +289,36 @@ defmodule BlockScoutWeb.AddressViewTest do
assert AddressView.token_title(token) == "super token money (ST$)" assert AddressView.token_title(token) == "super token money (ST$)"
end end
end end
describe "current_tab_name/1" do
test "generates the correct tab name for the token path" do
path = address_token_path(Endpoint, :index, "0x4ddr3s")
assert AddressView.current_tab_name(path) == "Tokens"
end
test "generates the correct tab name for the transactions path" do
path = address_transaction_path(Endpoint, :index, "0x4ddr3s")
assert AddressView.current_tab_name(path) == "Transactions"
end
test "generates the correct tab name for the internal transactions path" do
path = address_internal_transaction_path(Endpoint, :index, "0x4ddr3s")
assert AddressView.current_tab_name(path) == "Internal Transactions"
end
test "generates the correct tab name for the contracts path" do
path = address_contract_path(Endpoint, :index, "0x4ddr3s")
assert AddressView.current_tab_name(path) == "Code"
end
test "generates the correct tab name for the read_contract path" do
path = address_read_contract_path(Endpoint, :index, "0x4ddr3s")
assert AddressView.current_tab_name(path) == "Read Contract"
end
end
end end

Loading…
Cancel
Save