diff --git a/.dialyzer-ignore b/.dialyzer-ignore index 71f24c3537..7eba66f776 100644 --- a/.dialyzer-ignore +++ b/.dialyzer-ignore @@ -23,7 +23,7 @@ lib/indexer/fetcher/token_total_supply_on_demand.ex:16 lib/explorer/exchange_rates/source.ex:110 lib/explorer/exchange_rates/source.ex:113 lib/explorer/smart_contract/verifier.ex:89 -lib/block_scout_web/templates/address_contract/index.html.eex:149 +lib/block_scout_web/templates/address_contract/index.html.eex:151 lib/explorer/staking/stake_snapshotting.ex:15: Function do_snapshotting/7 has no local return lib/explorer/staking/stake_snapshotting.ex:147 lib/explorer/third_party_integrations/sourcify.ex:65 diff --git a/CHANGELOG.md b/CHANGELOG.md index dde42fed6a..00dc157403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#3888](https://github.com/blockscout/blockscout/pull/3888) - EIP-1967 contract proxy pattern detection fix ### Chore - [#3870](https://github.com/blockscout/blockscout/pull/3870) - Manage token balance on-demand fetcher threshold via env var diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex index 7b7755f41b..dee9fa764b 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/smart_contract_controller.ex @@ -91,7 +91,7 @@ defmodule BlockScoutWeb.SmartContractController do with true <- ajax?(conn), {:ok, address_hash} <- Chain.string_to_address_hash(params["id"]), {:ok, address} <- Chain.find_contract_address(address_hash, address_options, true) do - contract_type = if Chain.proxy_contract?(address.smart_contract.abi), do: :proxy, else: :regular + contract_type = if Chain.proxy_contract?(address.hash, address.smart_contract.abi), do: :proxy, else: :regular outputs = Reader.query_function( diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex index 2d8b5d3790..f0e486c358 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex @@ -83,7 +83,7 @@ class: "card-tab #{tab_status("read-contract", @conn.request_path)}") %> <% end %> - <%= if smart_contract_is_proxy?(@address) do %> + <%= if @is_proxy do %> <%= link( gettext("Read Proxy"), to: AccessHelpers.get_path(@conn, :address_read_proxy_path, :index, @address.hash), @@ -97,7 +97,7 @@ class: "card-tab #{tab_status("write-contract", @conn.request_path)}") %> <% end %> - <%= if smart_contract_with_write_functions?(@address) && smart_contract_is_proxy?(@address) do %> + <%= if smart_contract_with_write_functions?(@address) && @is_proxy do %> <%= link( gettext("Write Proxy"), to: AccessHelpers.get_path(@conn, :address_write_proxy_path, :index, @address.hash), diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex index a64d1458e4..9e8b93630a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex @@ -1,11 +1,13 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index 6efd199e6d..272beac456 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -6,10 +6,12 @@ <% additional_sources = if smart_contract_verified, do: @address.smart_contract_additional_sources, else: additional_sources_from_twin %>
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
<%= unless smart_contract_verified do %> <%= if minimal_proxy_template do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex index 6cb4ccf6ab..7ab2392336 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex @@ -1,7 +1,9 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %> <% contract = last_decompiled_contract_version(@address.decompiled_smart_contracts) %> <%= if contract do %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index 9b63784c5e..2167fedea8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex index 8d5c49f430..dd18d1ee87 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex @@ -1,8 +1,10 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>

<%= gettext "Logs" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex index 9181602ffe..a0bef3edf7 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex index 9181602ffe..a0bef3edf7 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_proxy/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex index d765ea3ff7..7d6d093c72 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>

<%= gettext "Tokens" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex index 649caede21..c85355c0f9 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
<%= if assigns[:token] do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex index 10d7611e62..05b528f326 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex @@ -1,10 +1,12 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex index df34bab807..45a356d747 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex index 0c7874b6e9..3dd725e742 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_write_contract/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex index 0c7874b6e9..3dd725e742 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_write_proxy/index.html.eex @@ -1,9 +1,11 @@
- <%= render BlockScoutWeb.AddressView, "overview.html", assigns %> + <% is_proxy = BlockScoutWeb.AddressView.smart_contract_is_proxy?(@address) %> + + <%= render BlockScoutWeb.AddressView, "overview.html", address: @address, is_proxy: is_proxy, conn: @conn, exchange_rate: @exchange_rate, coin_balance_status: @coin_balance_status, counters_path: @counters_path %>
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> + <%= render BlockScoutWeb.AddressView, "_tabs.html", address: @address, is_proxy: is_proxy, conn: @conn %>
diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex index f0dc1ed29d..4db6f9b1ae 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex @@ -235,7 +235,7 @@ defmodule BlockScoutWeb.AddressView do def smart_contract_with_read_only_functions?(%Address{smart_contract: nil}), do: false def smart_contract_is_proxy?(%Address{smart_contract: %SmartContract{}} = address) do - Chain.proxy_contract?(address.smart_contract.abi) + Chain.proxy_contract?(address.hash, address.smart_contract.abi) end def smart_contract_is_proxy?(%Address{smart_contract: nil}), do: false diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 0e10f98dd0..4590225176 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -135,9 +135,9 @@ msgid "Addresses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:28 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:26 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:24 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:30 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:28 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:26 #: lib/block_scout_web/templates/layout/_network_selector.html.eex:21 #: lib/block_scout_web/templates/layout/_topnav.html.eex:93 #: lib/block_scout_web/views/address_internal_transaction_view.ex:10 @@ -169,7 +169,7 @@ msgid "Balance" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:16 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:18 msgid "Balances" msgstr "" @@ -295,7 +295,7 @@ msgid "Compiler" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:47 +#: lib/block_scout_web/templates/address_contract/index.html.eex:49 msgid "Compiler version" msgstr "" @@ -307,35 +307,35 @@ msgid "Connection Lost" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:12 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #: lib/block_scout_web/templates/block/index.html.eex:6 msgid "Connection Lost, click to load newer blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:15 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 msgid "Connection Lost, click to load newer internal transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_transaction/index.html.eex:11 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:17 #: lib/block_scout_web/templates/transaction/index.html.eex:23 msgid "Connection Lost, click to load newer transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_validation/index.html.eex:10 +#: lib/block_scout_web/templates/address_validation/index.html.eex:12 msgid "Connection Lost, click to load newer validations" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:66 +#: lib/block_scout_web/templates/address_contract/index.html.eex:68 msgid "Constructor Arguments" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:104 +#: lib/block_scout_web/templates/address_contract/index.html.eex:106 msgid "Contract ABI" msgstr "" @@ -355,8 +355,8 @@ msgid "Contract Address Pending" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:135 -#: lib/block_scout_web/templates/address_contract/index.html.eex:143 +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#: lib/block_scout_web/templates/address_contract/index.html.eex:145 msgid "Contract Byte Code" msgstr "" @@ -371,7 +371,7 @@ msgid "Contract Creation" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:120 +#: lib/block_scout_web/templates/address_contract/index.html.eex:122 msgid "Contract Creation Code" msgstr "" @@ -388,17 +388,17 @@ msgid "Contract Name" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:39 +#: lib/block_scout_web/templates/address_contract/index.html.eex:41 msgid "Contract name:" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:76 +#: lib/block_scout_web/templates/address_contract/index.html.eex:78 msgid "Contract source code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:126 +#: lib/block_scout_web/templates/address_contract/index.html.eex:128 msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -408,7 +408,7 @@ msgid "Contribute" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:106 +#: lib/block_scout_web/templates/address_contract/index.html.eex:108 msgid "Copy ABI" msgstr "" @@ -421,18 +421,18 @@ msgid "Copy Address" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:122 +#: lib/block_scout_web/templates/address_contract/index.html.eex:124 msgid "Copy Contract Creation Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 msgid "Copy Decompiled Contract Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:78 -#: lib/block_scout_web/templates/address_contract/index.html.eex:92 +#: lib/block_scout_web/templates/address_contract/index.html.eex:80 +#: lib/block_scout_web/templates/address_contract/index.html.eex:94 msgid "Copy Source Code" msgstr "" @@ -502,12 +502,12 @@ msgid "Decompiled code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:15 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 msgid "Decompiled contract code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:8 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:10 msgid "Decompiler version" msgstr "" @@ -546,7 +546,7 @@ msgid "Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:127 +#: lib/block_scout_web/templates/address_contract/index.html.eex:129 msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -577,7 +577,7 @@ msgid "ETH RPC API Documentation" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:58 +#: lib/block_scout_web/templates/address_contract/index.html.eex:60 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:82 msgid "EVM Version" msgstr "" @@ -671,7 +671,7 @@ msgid "Nonce" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:184 +#: lib/block_scout_web/templates/address_contract/index.html.eex:186 msgid "External libraries" msgstr "" @@ -707,9 +707,9 @@ msgid "Forked Blocks (Reorgs)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:40 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:38 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:36 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:42 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:40 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:38 #: lib/block_scout_web/views/address_internal_transaction_view.ex:9 #: lib/block_scout_web/views/address_token_transfer_view.ex:9 #: lib/block_scout_web/views/address_transaction_view.ex:9 @@ -805,7 +805,7 @@ msgid "There are no holders for this Token." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:56 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:58 msgid "There are no internal transactions for this address." msgstr "" @@ -821,12 +821,12 @@ msgid "There are no logs for this transaction." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:51 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:53 msgid "There are no token transfers for this address." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_token/index.html.eex:20 +#: lib/block_scout_web/templates/address_token/index.html.eex:22 msgid "There are no tokens for this address." msgstr "" @@ -836,7 +836,7 @@ msgid "There are no tokens." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_transaction/index.html.eex:53 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:55 msgid "There are no transactions for this address." msgstr "" @@ -857,9 +857,9 @@ msgid "This transaction is pending confirmation." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:34 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:32 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:30 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:36 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:34 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:32 #: lib/block_scout_web/views/address_internal_transaction_view.ex:8 #: lib/block_scout_web/views/address_token_transfer_view.ex:8 #: lib/block_scout_web/views/address_transaction_view.ex:8 @@ -898,7 +898,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:13 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:17 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:3 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:3 @@ -1011,10 +1011,10 @@ msgid "Limit" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/address_read_contract/index.html.eex:16 +#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:16 +#: lib/block_scout_web/templates/address_write_contract/index.html.eex:16 +#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:16 #: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:20 msgid "Loading..." msgstr "" @@ -1070,7 +1070,7 @@ msgid "Model" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:10 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:12 msgid "More internal transactions have come in" msgstr "" @@ -1118,12 +1118,12 @@ msgid "OUT" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:43 +#: lib/block_scout_web/templates/address_contract/index.html.eex:45 msgid "Optimization enabled" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:52 +#: lib/block_scout_web/templates/address_contract/index.html.eex:54 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:114 msgid "Optimization runs" msgstr "" @@ -1257,7 +1257,7 @@ msgid "Run" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/index.html.eex:14 +#: lib/block_scout_web/templates/address_logs/index.html.eex:16 #: lib/block_scout_web/templates/layout/_topnav.html.eex:217 #: lib/block_scout_web/templates/layout/_topnav.html.eex:261 msgid "Search" @@ -1312,13 +1312,13 @@ msgid "Block Rewards" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:36 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:52 -#: lib/block_scout_web/templates/address_logs/index.html.eex:21 -#: lib/block_scout_web/templates/address_token/index.html.eex:15 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:56 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:48 -#: lib/block_scout_web/templates/address_validation/index.html.eex:22 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:38 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:54 +#: lib/block_scout_web/templates/address_logs/index.html.eex:23 +#: lib/block_scout_web/templates/address_token/index.html.eex:17 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:58 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:50 +#: lib/block_scout_web/templates/address_validation/index.html.eex:24 #: lib/block_scout_web/templates/block_transaction/index.html.eex:23 #: lib/block_scout_web/templates/chain/show.html.eex:184 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:21 @@ -1370,7 +1370,7 @@ msgid "Testnet" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_validation/index.html.eex:18 +#: lib/block_scout_web/templates/address_validation/index.html.eex:20 msgid "There are no blocks validated by this address." msgstr "" @@ -1380,7 +1380,7 @@ msgid "There are no blocks." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/index.html.eex:26 +#: lib/block_scout_web/templates/address_logs/index.html.eex:28 msgid "There are no logs for this address." msgstr "" @@ -1400,17 +1400,17 @@ msgid "There are no transactions." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:41 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:43 msgid "There is no coin history for this address." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:29 msgid "There is no decompilded contracts for this address." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:27 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:29 #: lib/block_scout_web/templates/chain/show.html.eex:9 msgid "There was a problem loading the chart." msgstr "" @@ -1448,7 +1448,7 @@ msgid "To see accurate decoded input data, the contract must be verified." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/index.html.eex:12 +#: lib/block_scout_web/templates/address_logs/index.html.eex:14 msgid "Topic" msgstr "" @@ -1579,9 +1579,9 @@ msgid "Value" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:22 -#: lib/block_scout_web/templates/address_contract/index.html.eex:151 -#: lib/block_scout_web/templates/address_contract/index.html.eex:163 +#: lib/block_scout_web/templates/address_contract/index.html.eex:24 +#: lib/block_scout_web/templates/address_contract/index.html.eex:153 +#: lib/block_scout_web/templates/address_contract/index.html.eex:165 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:19 msgid "Verify & Publish" msgstr "" @@ -1770,7 +1770,7 @@ msgid "Indexing Tokens" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:24 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:26 msgid "Loading chart" msgstr "" @@ -1809,7 +1809,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address_validation/index.html.eex:13 +#: lib/block_scout_web/templates/address_validation/index.html.eex:15 #: lib/block_scout_web/views/address_view.ex:354 msgid "Blocks Validated" msgstr "" @@ -1837,7 +1837,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:28 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:19 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:21 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/views/address_view.ex:344 @@ -1847,7 +1847,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:41 -#: lib/block_scout_web/templates/address_logs/index.html.eex:8 +#: lib/block_scout_web/templates/address_logs/index.html.eex:10 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/views/address_view.ex:355 @@ -1865,8 +1865,8 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address_token/index.html.eex:8 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:11 +#: lib/block_scout_web/templates/address_token/index.html.eex:10 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:89 #: lib/block_scout_web/templates/layout/_topnav.html.eex:115 #: lib/block_scout_web/templates/tokens/index.html.eex:4 @@ -1876,7 +1876,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:15 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:17 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/block_transaction/index.html.eex:18 #: lib/block_scout_web/templates/chain/show.html.eex:238 @@ -1969,12 +1969,12 @@ msgid "All functions displayed below are from ABI of that contract. In order to msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:22 +#: lib/block_scout_web/templates/address_contract/index.html.eex:24 msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:22 +#: lib/block_scout_web/templates/address_contract/index.html.eex:24 msgid "button" msgstr "" @@ -1990,8 +1990,8 @@ msgid "Play" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:137 -#: lib/block_scout_web/templates/address_contract/index.html.eex:147 +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#: lib/block_scout_web/templates/address_contract/index.html.eex:149 msgid "Copy Byte Code" msgstr "" @@ -2611,7 +2611,7 @@ msgid "Stakes" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:20 +#: lib/block_scout_web/templates/address_contract/index.html.eex:22 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:16 msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" @@ -2798,6 +2798,6 @@ msgid "Sources and metadata JSON file" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:31 +#: lib/block_scout_web/templates/address_contract/index.html.eex:33 msgid "This contract has been verified via Sourcify." msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 0e10f98dd0..4590225176 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -135,9 +135,9 @@ msgid "Addresses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:28 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:26 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:24 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:30 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:28 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:26 #: lib/block_scout_web/templates/layout/_network_selector.html.eex:21 #: lib/block_scout_web/templates/layout/_topnav.html.eex:93 #: lib/block_scout_web/views/address_internal_transaction_view.ex:10 @@ -169,7 +169,7 @@ msgid "Balance" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:16 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:18 msgid "Balances" msgstr "" @@ -295,7 +295,7 @@ msgid "Compiler" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:47 +#: lib/block_scout_web/templates/address_contract/index.html.eex:49 msgid "Compiler version" msgstr "" @@ -307,35 +307,35 @@ msgid "Connection Lost" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:12 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:14 #: lib/block_scout_web/templates/block/index.html.eex:6 msgid "Connection Lost, click to load newer blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:15 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:17 msgid "Connection Lost, click to load newer internal transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_transaction/index.html.eex:11 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:13 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:17 #: lib/block_scout_web/templates/transaction/index.html.eex:23 msgid "Connection Lost, click to load newer transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_validation/index.html.eex:10 +#: lib/block_scout_web/templates/address_validation/index.html.eex:12 msgid "Connection Lost, click to load newer validations" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:66 +#: lib/block_scout_web/templates/address_contract/index.html.eex:68 msgid "Constructor Arguments" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:104 +#: lib/block_scout_web/templates/address_contract/index.html.eex:106 msgid "Contract ABI" msgstr "" @@ -355,8 +355,8 @@ msgid "Contract Address Pending" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:135 -#: lib/block_scout_web/templates/address_contract/index.html.eex:143 +#: lib/block_scout_web/templates/address_contract/index.html.eex:137 +#: lib/block_scout_web/templates/address_contract/index.html.eex:145 msgid "Contract Byte Code" msgstr "" @@ -371,7 +371,7 @@ msgid "Contract Creation" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:120 +#: lib/block_scout_web/templates/address_contract/index.html.eex:122 msgid "Contract Creation Code" msgstr "" @@ -388,17 +388,17 @@ msgid "Contract Name" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:39 +#: lib/block_scout_web/templates/address_contract/index.html.eex:41 msgid "Contract name:" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:76 +#: lib/block_scout_web/templates/address_contract/index.html.eex:78 msgid "Contract source code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:126 +#: lib/block_scout_web/templates/address_contract/index.html.eex:128 msgid "Contracts that self destruct in their constructors have no contract code published and cannot be verified." msgstr "" @@ -408,7 +408,7 @@ msgid "Contribute" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:106 +#: lib/block_scout_web/templates/address_contract/index.html.eex:108 msgid "Copy ABI" msgstr "" @@ -421,18 +421,18 @@ msgid "Copy Address" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:122 +#: lib/block_scout_web/templates/address_contract/index.html.eex:124 msgid "Copy Contract Creation Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:19 msgid "Copy Decompiled Contract Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:78 -#: lib/block_scout_web/templates/address_contract/index.html.eex:92 +#: lib/block_scout_web/templates/address_contract/index.html.eex:80 +#: lib/block_scout_web/templates/address_contract/index.html.eex:94 msgid "Copy Source Code" msgstr "" @@ -502,12 +502,12 @@ msgid "Decompiled code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:15 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:17 msgid "Decompiled contract code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:8 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:10 msgid "Decompiler version" msgstr "" @@ -546,7 +546,7 @@ msgid "Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:127 +#: lib/block_scout_web/templates/address_contract/index.html.eex:129 msgid "Displaying the init data provided of the creating transaction." msgstr "" @@ -577,7 +577,7 @@ msgid "ETH RPC API Documentation" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:58 +#: lib/block_scout_web/templates/address_contract/index.html.eex:60 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:82 msgid "EVM Version" msgstr "" @@ -671,7 +671,7 @@ msgid "Nonce" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:184 +#: lib/block_scout_web/templates/address_contract/index.html.eex:186 msgid "External libraries" msgstr "" @@ -707,9 +707,9 @@ msgid "Forked Blocks (Reorgs)" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:40 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:38 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:36 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:42 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:40 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:38 #: lib/block_scout_web/views/address_internal_transaction_view.ex:9 #: lib/block_scout_web/views/address_token_transfer_view.ex:9 #: lib/block_scout_web/views/address_transaction_view.ex:9 @@ -805,7 +805,7 @@ msgid "There are no holders for this Token." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:56 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:58 msgid "There are no internal transactions for this address." msgstr "" @@ -821,12 +821,12 @@ msgid "There are no logs for this transaction." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:51 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:53 msgid "There are no token transfers for this address." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_token/index.html.eex:20 +#: lib/block_scout_web/templates/address_token/index.html.eex:22 msgid "There are no tokens for this address." msgstr "" @@ -836,7 +836,7 @@ msgid "There are no tokens." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_transaction/index.html.eex:53 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:55 msgid "There are no transactions for this address." msgstr "" @@ -857,9 +857,9 @@ msgid "This transaction is pending confirmation." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:34 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:32 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:30 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:36 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:34 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:32 #: lib/block_scout_web/views/address_internal_transaction_view.ex:8 #: lib/block_scout_web/views/address_token_transfer_view.ex:8 #: lib/block_scout_web/views/address_transaction_view.ex:8 @@ -898,7 +898,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:13 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:17 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:19 #: lib/block_scout_web/templates/tokens/instance/overview/_tabs.html.eex:3 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:16 #: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:3 @@ -1011,10 +1011,10 @@ msgid "Limit" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_contract/index.html.eex:14 -#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:14 +#: lib/block_scout_web/templates/address_read_contract/index.html.eex:16 +#: lib/block_scout_web/templates/address_read_proxy/index.html.eex:16 +#: lib/block_scout_web/templates/address_write_contract/index.html.eex:16 +#: lib/block_scout_web/templates/address_write_proxy/index.html.eex:16 #: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:20 msgid "Loading..." msgstr "" @@ -1070,7 +1070,7 @@ msgid "Model" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:10 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:12 msgid "More internal transactions have come in" msgstr "" @@ -1118,12 +1118,12 @@ msgid "OUT" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:43 +#: lib/block_scout_web/templates/address_contract/index.html.eex:45 msgid "Optimization enabled" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:52 +#: lib/block_scout_web/templates/address_contract/index.html.eex:54 #: lib/block_scout_web/templates/address_contract_verification_via_flattened_code/new.html.eex:114 msgid "Optimization runs" msgstr "" @@ -1257,7 +1257,7 @@ msgid "Run" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/index.html.eex:14 +#: lib/block_scout_web/templates/address_logs/index.html.eex:16 #: lib/block_scout_web/templates/layout/_topnav.html.eex:217 #: lib/block_scout_web/templates/layout/_topnav.html.eex:261 msgid "Search" @@ -1312,13 +1312,13 @@ msgid "Block Rewards" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:36 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:52 -#: lib/block_scout_web/templates/address_logs/index.html.eex:21 -#: lib/block_scout_web/templates/address_token/index.html.eex:15 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:56 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:48 -#: lib/block_scout_web/templates/address_validation/index.html.eex:22 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:38 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:54 +#: lib/block_scout_web/templates/address_logs/index.html.eex:23 +#: lib/block_scout_web/templates/address_token/index.html.eex:17 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:58 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:50 +#: lib/block_scout_web/templates/address_validation/index.html.eex:24 #: lib/block_scout_web/templates/block_transaction/index.html.eex:23 #: lib/block_scout_web/templates/chain/show.html.eex:184 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:21 @@ -1370,7 +1370,7 @@ msgid "Testnet" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_validation/index.html.eex:18 +#: lib/block_scout_web/templates/address_validation/index.html.eex:20 msgid "There are no blocks validated by this address." msgstr "" @@ -1380,7 +1380,7 @@ msgid "There are no blocks." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/index.html.eex:26 +#: lib/block_scout_web/templates/address_logs/index.html.eex:28 msgid "There are no logs for this address." msgstr "" @@ -1400,17 +1400,17 @@ msgid "There are no transactions." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:41 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:43 msgid "There is no coin history for this address." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:27 +#: lib/block_scout_web/templates/address_decompiled_contract/index.html.eex:29 msgid "There is no decompilded contracts for this address." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:27 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:29 #: lib/block_scout_web/templates/chain/show.html.eex:9 msgid "There was a problem loading the chart." msgstr "" @@ -1448,7 +1448,7 @@ msgid "To see accurate decoded input data, the contract must be verified." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/index.html.eex:12 +#: lib/block_scout_web/templates/address_logs/index.html.eex:14 msgid "Topic" msgstr "" @@ -1579,9 +1579,9 @@ msgid "Value" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:22 -#: lib/block_scout_web/templates/address_contract/index.html.eex:151 -#: lib/block_scout_web/templates/address_contract/index.html.eex:163 +#: lib/block_scout_web/templates/address_contract/index.html.eex:24 +#: lib/block_scout_web/templates/address_contract/index.html.eex:153 +#: lib/block_scout_web/templates/address_contract/index.html.eex:165 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:19 msgid "Verify & Publish" msgstr "" @@ -1770,7 +1770,7 @@ msgid "Indexing Tokens" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:24 +#: lib/block_scout_web/templates/address_coin_balance/index.html.eex:26 msgid "Loading chart" msgstr "" @@ -1809,7 +1809,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:48 -#: lib/block_scout_web/templates/address_validation/index.html.eex:13 +#: lib/block_scout_web/templates/address_validation/index.html.eex:15 #: lib/block_scout_web/views/address_view.ex:354 msgid "Blocks Validated" msgstr "" @@ -1837,7 +1837,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:28 -#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:19 +#: lib/block_scout_web/templates/address_internal_transaction/index.html.eex:21 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:11 #: lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex:6 #: lib/block_scout_web/views/address_view.ex:344 @@ -1847,7 +1847,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:41 -#: lib/block_scout_web/templates/address_logs/index.html.eex:8 +#: lib/block_scout_web/templates/address_logs/index.html.eex:10 #: lib/block_scout_web/templates/transaction/_tabs.html.eex:17 #: lib/block_scout_web/templates/transaction_log/index.html.eex:8 #: lib/block_scout_web/views/address_view.ex:355 @@ -1865,8 +1865,8 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:21 -#: lib/block_scout_web/templates/address_token/index.html.eex:8 -#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:11 +#: lib/block_scout_web/templates/address_token/index.html.eex:10 +#: lib/block_scout_web/templates/address_token_transfer/index.html.eex:13 #: lib/block_scout_web/templates/layout/_topnav.html.eex:89 #: lib/block_scout_web/templates/layout/_topnav.html.eex:115 #: lib/block_scout_web/templates/tokens/index.html.eex:4 @@ -1876,7 +1876,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address/_tabs.html.eex:7 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:15 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:17 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/block_transaction/index.html.eex:18 #: lib/block_scout_web/templates/chain/show.html.eex:238 @@ -1969,12 +1969,12 @@ msgid "All functions displayed below are from ABI of that contract. In order to msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:22 +#: lib/block_scout_web/templates/address_contract/index.html.eex:24 msgid "All metadata displayed below is from that contract. In order to verify current contract, click" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:22 +#: lib/block_scout_web/templates/address_contract/index.html.eex:24 msgid "button" msgstr "" @@ -1990,8 +1990,8 @@ msgid "Play" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:137 -#: lib/block_scout_web/templates/address_contract/index.html.eex:147 +#: lib/block_scout_web/templates/address_contract/index.html.eex:139 +#: lib/block_scout_web/templates/address_contract/index.html.eex:149 msgid "Copy Byte Code" msgstr "" @@ -2611,7 +2611,7 @@ msgid "Stakes" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:20 +#: lib/block_scout_web/templates/address_contract/index.html.eex:22 #: lib/block_scout_web/templates/smart_contract/_functions.html.eex:16 msgid "Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB" msgstr "" @@ -2798,6 +2798,6 @@ msgid "Sources and metadata JSON file" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_contract/index.html.eex:31 +#: lib/block_scout_web/templates/address_contract/index.html.eex:33 msgid "This contract has been verified via Sourcify." msgstr "" diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_read_contract_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_read_contract_controller_test.exs index e96e1fb6d5..791208ad68 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_read_contract_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_read_contract_controller_test.exs @@ -2,6 +2,7 @@ defmodule BlockScoutWeb.AddressReadContractControllerTest do use BlockScoutWeb.ConnCase, async: true use ExUnit.Case, async: false + alias BlockScoutWeb.AddressControllerTest alias Explorer.ExchangeRates.Token alias Explorer.Chain.Address @@ -51,6 +52,8 @@ defmodule BlockScoutWeb.AddressReadContractControllerTest do insert(:smart_contract, address_hash: contract_address.hash) + get_eip1967_implementation() + conn = get(conn, address_read_contract_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) @@ -79,4 +82,19 @@ defmodule BlockScoutWeb.AddressReadContractControllerTest do assert html_response(conn, 404) end end + + def get_eip1967_implementation do + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_read_proxy_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_read_proxy_controller_test.exs index 5ee551deb4..be6266ca08 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_read_proxy_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_read_proxy_controller_test.exs @@ -51,6 +51,8 @@ defmodule BlockScoutWeb.AddressReadProxyControllerTest do insert(:smart_contract, address_hash: contract_address.hash) + get_eip1967_implementation() + conn = get(conn, address_read_proxy_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) assert html_response(conn, 200) @@ -77,4 +79,19 @@ defmodule BlockScoutWeb.AddressReadProxyControllerTest do assert html_response(conn, 404) end end + + def get_eip1967_implementation do + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_write_contract_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_write_contract_controller_test.exs index 2450d76f99..49a6422a3b 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_write_contract_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_write_contract_controller_test.exs @@ -5,6 +5,8 @@ defmodule BlockScoutWeb.AddressWriteContractControllerTest do alias Explorer.ExchangeRates.Token alias Explorer.Chain.Address + use EthereumJSONRPC.Case, async: false + import Mox describe "GET index/3" do @@ -51,6 +53,8 @@ defmodule BlockScoutWeb.AddressWriteContractControllerTest do insert(:smart_contract, address_hash: contract_address.hash) + get_eip1967_implementation() + conn = get(conn, address_write_contract_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) @@ -79,4 +83,19 @@ defmodule BlockScoutWeb.AddressWriteContractControllerTest do assert html_response(conn, 404) end end + + def get_eip1967_implementation do + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/address_write_proxy_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/address_write_proxy_controller_test.exs index de5db9d675..187bd501a3 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/address_write_proxy_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/address_write_proxy_controller_test.exs @@ -51,6 +51,8 @@ defmodule BlockScoutWeb.AddressWriteProxyControllerTest do insert(:smart_contract, address_hash: contract_address.hash) + get_eip1967_implementation() + conn = get(conn, address_write_proxy_path(BlockScoutWeb.Endpoint, :index, Address.checksum(contract_address.hash))) @@ -79,4 +81,19 @@ defmodule BlockScoutWeb.AddressWriteProxyControllerTest do assert html_response(conn, 404) end end + + def get_eip1967_implementation do + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + end end diff --git a/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs index d8f8c35db5..92109eba1c 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/smart_contract_controller_test.exs @@ -232,6 +232,8 @@ defmodule BlockScoutWeb.SmartContractControllerTest do address = insert(:contract_address) smart_contract = insert(:smart_contract, address_hash: address.hash) + get_eip1967_implementation() + blockchain_get_function_mock() path = @@ -288,4 +290,19 @@ defmodule BlockScoutWeb.SmartContractControllerTest do end ) end + + def get_eip1967_implementation do + expect(EthereumJSONRPC.Mox, :json_rpc, fn %{ + id: 0, + method: "eth_getStorageAt", + params: [ + _, + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + "latest" + ] + }, + _options -> + {:ok, "0x0000000000000000000000000000000000000000000000000000000000000000"} + end) + end end diff --git a/apps/explorer/lib/explorer/chain.ex b/apps/explorer/lib/explorer/chain.ex index d370b341dd..2336e59d4a 100644 --- a/apps/explorer/lib/explorer/chain.ex +++ b/apps/explorer/lib/explorer/chain.ex @@ -5961,7 +5961,7 @@ defmodule Explorer.Chain do [] end - def proxy_contract?(abi) when not is_nil(abi) do + def proxy_contract?(address_hash, abi) when not is_nil(abi) do implementation_method_abi = abi |> Enum.find(fn method -> @@ -5969,10 +5969,13 @@ defmodule Explorer.Chain do master_copy_pattern?(method) end) - if implementation_method_abi, do: true, else: false + if implementation_method_abi || + get_implementation_address_hash_eip_1967(address_hash) !== "0x0000000000000000000000000000000000000000", + do: true, + else: false end - def proxy_contract?(abi) when is_nil(abi), do: false + def proxy_contract?(_address_hash, abi) when is_nil(abi), do: false def gnosis_safe_contract?(abi) when not is_nil(abi) do implementation_method_abi = @@ -5994,11 +5997,6 @@ defmodule Explorer.Chain do Map.get(method, "name") == "implementation" end) - implementation_method_abi_state_mutability = - implementation_method_abi && Map.get(implementation_method_abi, "stateMutability") - - is_eip1967 = if implementation_method_abi_state_mutability == "nonpayable", do: true, else: false - master_copy_method_abi = abi |> Enum.find(fn method -> @@ -6006,9 +6004,6 @@ defmodule Explorer.Chain do end) cond do - is_eip1967 -> - get_implementation_address_hash_eip_1967(proxy_address_hash) - implementation_method_abi -> get_implementation_address_hash_basic(proxy_address_hash, abi) @@ -6016,7 +6011,7 @@ defmodule Explorer.Chain do get_implementation_address_hash_from_master_copy_pattern(proxy_address_hash) true -> - nil + get_implementation_address_hash_eip_1967(proxy_address_hash) end end