diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a65929ca3..cefb2622a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - [#2425](https://github.com/poanetwork/blockscout/pull/2425) - Force to show address view for checksummed address even if it is not in DB ### Chore +- [#2492](https://github.com/poanetwork/blockscout/pull/2492) - hide decoded row if event is not decoded - [#2402](https://github.com/poanetwork/blockscout/pull/2402) - bump otp version to 22.0 - [#2432](https://github.com/poanetwork/blockscout/pull/2432) - bump credo version - [#2457](https://github.com/poanetwork/blockscout/pull/2457) - update mix.lock diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/_logs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/_logs.html.eex index 3fb638b1d9..e49adf8801 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/_logs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/_logs.html.eex @@ -11,10 +11,10 @@ ) %> -
<%= gettext "Decoded" %>
-
<%= case decode(@log, @log.transaction) do %> <% {:error, :contract_not_verified} -> %> +
<%= gettext "Decoded" %>
+
<%= gettext "To see decoded input data, the contract must be verified." %> <%= case @log.transaction do %> @@ -25,10 +25,14 @@ <% end %>
<% {:error, :could_not_decode} -> %> +
<%= gettext "Decoded" %>
+
<%= gettext "Failed to decode log data." %>
<% {:ok, method_id, text, mapping} -> %> +
<%= gettext "Decoded" %>
+
@@ -78,7 +82,7 @@ <% end %>
Method Id
- <% _ -> %> + <% _ -> %> <%= nil %> <% end %>
<%= gettext "Topics" %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex index ff3e46d42a..eb3f075cfc 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/_logs.html.eex @@ -11,10 +11,10 @@ ) %> -
<%= gettext "Decoded" %>
-
<%= case decode(@log, @transaction) do %> <% {:error, :contract_not_verified} -> %> +
<%= gettext "Decoded" %>
+
<%= gettext "To see decoded input data, the contract must be verified." %> <%= case @transaction do %> @@ -25,10 +25,16 @@ <% end %>
<% {:error, :could_not_decode} -> %> +
<%= gettext "Decoded" %>
+
<%= gettext "Failed to decode log data." %>
+ <% {:error, :no_matching_function} -> %> + <%= nil %> <% {:ok, method_id, text, mapping} -> %> +
<%= gettext "Decoded" %>
+
diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 0bdb1a6730..95bb1f079b 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -547,10 +547,10 @@ msgid "Must be set to:" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:46 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:50 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:46 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:52 msgid "Name" msgstr "" @@ -1108,8 +1108,12 @@ msgid "Static Call" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:14 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:14 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:16 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:28 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:34 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:16 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:28 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:36 msgid "Decoded" msgstr "" @@ -1753,9 +1757,9 @@ msgid "Constructor Arguments" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:59 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:63 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:59 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:65 msgid "Copy Value" msgstr "" @@ -1765,29 +1769,29 @@ msgid "Create2" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:49 -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:114 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:53 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:118 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:115 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:55 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:121 msgid "Data" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:29 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:29 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:31 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:31 msgid "Failed to decode log data." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:48 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:48 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:52 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:54 msgid "Indexed?" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:43 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:43 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 msgid "Log Data" msgstr "" @@ -1799,14 +1803,14 @@ msgid "Reward" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:84 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:85 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:88 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:91 msgid "Topics" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:51 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:47 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53 msgid "Type" 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 80e106b327..6ecd22e7fa 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 @@ -547,10 +547,10 @@ msgid "Must be set to:" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:46 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:50 #: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:52 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:19 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:46 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:52 msgid "Name" msgstr "" @@ -1108,8 +1108,12 @@ msgid "Static Call" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:14 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:14 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:16 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:28 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:34 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:16 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:28 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:36 msgid "Decoded" msgstr "" @@ -1754,9 +1758,9 @@ msgid "Constructor Arguments" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:59 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:63 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:31 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:59 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:65 msgid "Copy Value" msgstr "" @@ -1766,29 +1770,29 @@ msgid "Create2" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:49 -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:114 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:53 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:118 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:21 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:115 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:55 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:121 msgid "Data" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:29 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:29 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:31 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:31 msgid "Failed to decode log data." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:48 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:48 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:52 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:54 msgid "Indexed?" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:43 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:43 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:49 msgid "Log Data" msgstr "" @@ -1800,14 +1804,14 @@ msgid "Reward" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:84 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:85 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:88 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:91 msgid "Topics" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_logs/_logs.html.eex:47 +#: lib/block_scout_web/templates/address_logs/_logs.html.eex:51 #: lib/block_scout_web/templates/transaction/_decoded_input_body.html.eex:20 -#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:47 +#: lib/block_scout_web/templates/transaction_log/_logs.html.eex:53 msgid "Type" msgstr ""
Method Id